Paging Through Results Using Offset and Limit

Applies to QAComplete 14.4, last modified on May 20, 2024

By default, GET operations, which return a list of requested items, return only the first 25 items. To get a different set of items, you can use the offset and limit parameters in the query string of the GET request.

For example, the …/defects (GET) operation returns:

URL Description
…/defects Returns the first 25 defects (the default limit is 25).
…/defects?limit=10 Returns the first 10 defects.
…/defects?offset=5&limit=5 Returns defects 6..10.
…/defects?offset=10 Returns defects 11..36 (the default number of the returned defects is 25).

To page through all the available items, first, use the metadata section of the JSON response to get the total number of items.

   "metadata": {
      "result_set": {
         "count": 25,
         "offset": 0,
         "limit": 25,
         "total": 77

Tip: You can request …/defects?limit=0 to get just metadata, without defect data.

Then send subsequent requests with increasing offsets and a fixed limit until you get all the data.


See Also

QAComplete REST API Reference

Highlight search results