Skip to content
KiweelyKiweelyKiweely

How do I get more than 500 rows from a Workday WQL query?

The 500-row stop belongs to the View WQL Query Result report. The WQL REST API returns up to 10,000 rows per page: pass limit (0 to 10,000) and offset. A worked run pages 48,491 rows in five calls, with Workday’s exact errors for a limit above 10,000 and an offset past the end.

  • Checked against Workday on
  • Applies to Workday WQL
  • 5 min read
  • Published
  • By Kiweely
On this page

The 500-row stop is not a WQL limit. It belongs to the View WQL Query Result report, which truncates anything without a limit, or with a limit above 500. The WQL REST API returns up to 10,000 rows per page: send limit between 0 and 10,000, then move offset forward by the page size until you reach total.

Why does my WQL query stop at 500 rows?

In the tenant, the View WQL Query Result report is a place to test queries. Workday’s documentation says it returns up to 500 rows and truncates the results when a query is entered without a limit or with a limit greater than 500. That is a display choice of the report. Run the same query through the REST API and the 500 does not apply.

The limits that do belong to WQL:

Limit Figure Source
LimitRows shown by the View WQL Query Result report Figure500 SourceView WQL Query Results
LimitRows in one REST page (the limit parameter) Figure0 to 10,000 SourcePagination of WQL Query Results
LimitRows returned by one query Figure1 million SourceWQL result limits
LimitHow long the page cache lives FigureThe user session, up to 30 minutes SourcePagination of WQL Query Results
LimitResponse timeout Figure30 minutes on a tenanted host, 5 minutes on the WCP API Gateway SourceWQL result limits
LimitGET /data query length FigureUnder 2,048 characters; use POST /data from 2,048 to 16,000 SourceWQL REST API

How do I page through a WQL result with limit and offset?

Send the query once without an offset, then ask for each following page with the same query. limit is the page size and offset is the first row of the page, counted from 0. Both go on the URL. They worked on POST /data with the query in the body, as well as on GET /data.

text
{baseURL}/data?limit=10000&offset=0
{baseURL}/data?limit=10000&offset=10000
{baseURL}/data?limit=10000&offset=20000
json
{"query": "SELECT workdayID FROM allIntegrationEvents ORDER BY workdayID"}

Each response carries total, the size of the whole result, and a data array holding the page. Keep going until offset + limit is at least total.

Worked example: 48,491 rows in five calls

The Development tenant’s allIntegrationEvents data source holds one row per integration event. A COUNT() query returned 48,491.

sql
SELECT workdayID FROM allIntegrationEvents ORDER BY workdayID
Request HTTP total Rows in data
RequestNo limit or offset HTTP200 total48,491 Rows in data10,000
Requestlimit=10000&offset=0 HTTP200 total48,491 Rows in data10,000
Requestlimit=10000&offset=10000 HTTP200 total48,491 Rows in data10,000
Requestlimit=10000&offset=20000 HTTP200 total48,491 Rows in data10,000
Requestlimit=10000&offset=30000 HTTP200 total48,491 Rows in data10,000
Requestlimit=10000&offset=40000 HTTP200 total48,491 Rows in data8,491

Two things stand out. A request with no limit still returned only 10,000 rows even though total said 48,491, so a script that reads one response and trusts it has lost 38,491 rows without an error. And the five pages together held 48,491 distinct workdayID values: nothing was repeated and nothing was missed.

The same data in smaller pages behaves the same way. limit=500&offset=48000 returned the last 491 rows.

What error does WQL return when the limit is too high?

A limit of 10,001 on that query returned HTTP 500 with:

text
Limit parameter must be in between 0 and 10000

A negative limit (limit=-1) returned the same message. The ceiling is 10,000 for the page, not for the query, so a larger result needs more pages.

What error does WQL return when the offset is past the end?

With total at 48,491, limit=10000&offset=48491 returned HTTP 500 with:

text
Offset is greater than or equal to total row size. Offset starts from 0, so for total results 48491 offset must be less than 48491

The same happened on a smaller query. A query capped with LIMIT 30 and paged at limit=20 returned 20 rows at offset 0, 10 rows at offset 20, and the error above for offset 30. Treat this error as the end-of-data signal, or better, compute the last offset from total.

Why does an offset request fail on the first call?

Asking for offset=20 on a query that had not run yet returned HTTP 500 with:

text
Requests with offsets need to be run after an initial request without an offset

Workday runs the query on the first request and keeps the result as a cache that later pages read. The pagination reference says the cache lasts for the user session, up to 30 minutes, and that adding offset=0 clears it. So:

  1. Send page one with no offset or offset=0.
  2. Send the remaining pages with the identical query text.
  3. If the cache has expired, start again from page one.

What is the difference between LIMIT and limit?

Workday reserves the word for two jobs. The LIMIT clause inside the query caps the whole result. The limit parameter on the URL sets the page size. SELECT workdayID FROM allIntegrationEvents ORDER BY createdMoment LIMIT 600 returned a total of 600 and all 600 rows in one response, which is already past the report’s 500.

When you log how many rows you asked for and how many you read, record the two separately.

Do you need the rows, or only a count?

Often the question behind “I need all the rows” is a count or a total. COUNT() with GROUP BY returns it in a few rows, whatever the size of the data:

sql
SELECT integrationSystem, COUNT() FROM allIntegrationEvents GROUP BY integrationSystem

If you do need the rows and the page cache is a concern, split on a date or number: WHERE createdMoment >= '2026-01-01' AND createdMoment < '2026-02-01', with >= at the start and < at the end so windows touch without overlapping. Do not split on text. Workday’s WHERE reference lists greater-than and less-than for Date and Numeric fields only, and in our tests an ORDER BY on a text employee ID sorted alphabetically, so “100001” came before “21008”.

What if the result is more than a million rows?

A query that matches more than 1 million rows and has no LIMIT clause fails. With a LIMIT at or under 1 million it succeeds and returns up to that many. Narrow the query by date or organisation, then page each slice.

What if Workday rejects the query instead of truncating it?

That is an error, not a limit. See the WQL error messages guide for the exact text and fix of each one.

Frequently asked questions

What is the largest limit the WQL REST API accepts?

10,000. A limit of 10,001 returned HTTP 500 with 'Limit parameter must be in between 0 and 10000'. Workday's pagination reference gives the same range, zero to 10,000.

Why does WQL say the offset is greater than or equal to the total row size?

The offset points past the last row. Offsets start at 0, so a result of 48,491 rows accepts offsets up to 48,490. Stop paging when offset plus the page size reaches the total.

Why does a WQL request with an offset fail with 'Requests with offsets need to be run after an initial request without an offset'?

Workday builds a cache on the first request and pages from it. Send the first page with no offset, or with offset=0, then request later pages with the same query. The cache lasts the user session, up to 30 minutes.

What is the difference between the LIMIT clause and the limit parameter?

The LIMIT clause caps how many rows the whole query returns. The limit parameter is the page size of one response. A query ending in LIMIT 600 reported a total of 600 and returned all 600 rows.

How many rows can one WQL query return in total?

One million. A query that would return more than a million rows with no LIMIT clause fails, per Workday's WQL result limits reference.

Sources checked

Related guides

All guides

Let Workday check the work.

Kiweely writes WQL and builds orchestrations in your own tenant, and Workday, not Kiweely, says whether they passed.

Get the next guide in your inbox.

One email a month with new guides and one Extend tip. Nothing else.

We’ll email you once to confirm. Unsubscribe in one click from any issue.