Pagination

This section describes the pagination mechanism used in the Nullify API.

Paginated endpoints take in an optional nextToken query parameter and return a nextToken field the response body.

They also take in a limit query parameter to specify the number of items to return per page.

For the initial request, the nextToken query parameter is not required.

The response body will contain a nextToken field if there are more items to be fetched.

To fetch the next page, provide the nextToken query parameter with the value from the previous response.

When the nextToken field is empty, there are no more items to fetch.

Request 1

curl -L \
   -H "Accept: application/json" \
   -H "Authorization: Bearer <YOUR-TOKEN>" \
   https://api.nullify.ai/secrets/findings?githubOwnerId=1234&limit=1

output:

{
    "findings": [
        {
            "id": "01J6EEXK3NKYKWW9XTPQYAF41N"
        }
    ],
    "numItems": 1,
    "nextToken": "eyJpZCI..."
}

Request 2

curl -L \
   -H "Accept: application/json" \
   -H "Authorization : Bearer <YOUR-TOKEN>" \
    https://api.nullify.ai/secrets/findings?githubOwnerId=1234&limit=1&nextToken=eyJpZCI...

output:

{
    "findings": [
        {
            "id": "01J6EFVQN34BCEAHDJTE4F9Y22"
        }
    ],
    "numItems": 1,
    "nextToken": ""
}

Last updated

© 2023 Nullify | All Rights Reserved.