Description Usage Arguments Value Examples
Sends iterative query requests to the Dimensions API and returns JSON list object of results. Important Note: Queries should not contain "limit" or "skip" as these are calculated dynamically based on function arguments.
1 2 3 4 5 6 7 8 9 10 | dim_request(
dim_token,
endpoint = "https://app.dimensions.ai/api/dsl.json",
query,
skip = 0,
limit = 0,
pause = 1.5,
force = FALSE,
logs = FALSE
)
|
dim_token |
Is the token object created by dim_login in the Global environment |
endpoint |
Is a string containing the Dimensions API endpoint URL. |
query |
Is a properly formatted text string of the DSL query. |
skip |
Specifies the offset for the first iteration (0 by default). |
limit |
Is the maximum returned documents. The max of 50k will be returned if this is left at 0 (the default). |
pause |
Is the time dim_request waits in between requests. Default is 1.5s. |
force |
Is a logical argument to determine whether or not to continue the data pull despite errors that may arise during iterations. By default it is set to FALSE. In situations where the query results are > 50k, force will prompt the first 50k results to be returned. |
logs |
Is a logical which determines whether or not a text log of query requests from each iteration will be exported to the project parent directory. By default set to FALSE. |
A JSON list object
1 2 3 4 5 | > dim_request(dim_token, query = 'search publications return publications', maxlimit = 100, force = TRUE)
In this example we would expect only the first 100 documents of the query to be returned as maxlimit is set to 100.
See documentation on the Dimensions Search Language (DSL) at https://docs.dimensions.ai/dsl/ to learn more
about how to write queries for the Dimensions API.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.