Enable Pagination

To enable pagination in an API call, use a query in the following format:

GET /v3/{insert query here}?resultStart=0&resultLimit=50

For example, the query below will return 2 Indicators:

GET /v3/indicators?resultStart=0&resultLimit=2

JSON Response

{
    "next": "https://myinstance.threatconnect.com/api/v3/indicators?resultStart=2&resultLimit=2",
    "data": [
        {
            "id": 18,
            "type": "EmailAddress",
            "ownerName": "Documentation Team",
            "dateAdded": "2021-10-26T16:26:19Z",
            "webLink": "/auth/indicators/details/emailaddress.xhtml?emailaddress=verybadguy%40bad.com",
            "lastModified": "2021-11-08T18:25:48Z",
            "description": "Sample Email Address Indicator created via API",
            "summary": "[email protected]",
            "privateFlag": false,
            "active": true,
            "activeLocked": false,
            "address": "[email protected]"
        },
        {
            "id": 15,
            "type": "EmailAddress",
            "ownerName": "Documentation Team",
            "dateAdded": "2021-10-26T13:08:37Z",
            "webLink": "/auth/indicators/details/emailaddress.xhtml?emailaddress=ultrabadguy%40bad.com",
            "lastModified": "2021-11-02T15:00:32Z",
            "description": "The worst kind of email address for a bad guy to use.",
            "summary": "[email protected]",
            "privateFlag": false,
            "active": true,
            "activeLocked": false,
            "address": "[email protected]"
        }
    ],
    "status": "Success"
}

Note

If the number of items in a result set exceeds the resultLimit, a link to the next set of items will be included at the top of the result set.

Pagination works by specifying a starting result index, as well as a result limit of items to be returned as HTTP query parameters to the request. For example, requesting a result start index of 50 and a result limit of 100 will retrieve items 50 to 150. Refer to the following table for more information about the resultStart and resultLimit query parameters.

Query Parameter Description Default
resultStart The starting index of the result set that is returned 0
resultLimit The limit to the number of results returned with the request 100

Warning

Specifying a resultStart other than 0 will omit the count field in the return data for performance reasons.

Note

The maximum value that can be specified for resultLimit is 10000.

A request that does not include the parameters indicated is assumed to use the default values above. A request having a resultStart value of 0 will return the current count of all items being queried. This count should be saved to iterate over the collection and to know when all items have been retrieved.

Note

Pagination counts and indices should not be stored in long-lived applications as a way to return to a result set. The dataset will change with time, so those range markers might cause objects to be skipped or duplicated if reused at a later time.