Concept: Pagination of WQL Query Results
When you first execute a query, the Workday Query Language (WQL) in the query parameter runs and builds a cache that returns a maximum of 10,000 rows. You can access additional rows by paginating through the result set using the
limit
and offset
parameters in the REST API call for your WQL query.WQL caches page limitation requests for only the length of a user session, up to a maximum of 30 minutes.
To view any remaining results, use these parameters:
Parameter | Description |
|---|---|
limit
| Specifies the number of rows in 1 page of results. Values must be between zero and 10,000. |
offset
| Specifies the starting row for the result set. Used by the limit parameter.
In the initial request for the first page of results, omit the offset parameter or set it to zero. |
Workday reserves the keyword
LIMIT
for both a clause and a pagination parameter. The LIMIT keyword isn't case-sensitive. We use uppercase and lowercase to help differentiate between clauses and pagination parameters.
- Use theLIMITclause to limit the number of total rows returned in a query response.
- Use thelimitparameter to specify how many rows to display per page of query response.
Examples
Depending on where you make WQL requests from, the base URL that you use differs.
WQL Request Source
| Base URL to Use
|
|---|---|
Workday tenanted host | https://{hostname}/api/wql/{version}/{tenant}
|
WCP API Gateway | https://api.workday.com/wql/{version}
|
To return 1,000 rows starting with the first row of the result set:
{baseURL}/data?limit=1000&offset=0&query=select worker, location from allWorkers
To return the next 1,000 rows, increase the offset to 1,000:
{baseURL}/data?limit=1000&offset=1000&query=select worker, location from allWorkers