> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerrail.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API pagination

> Iterate through paginated LayerRail API responses using cursor parameters, page size limits, and the next-page links returned in each payload.

List endpoints can paginate results when a project contains many resources.

## List response

```json theme={null}
{
  "items": [
    {
      "id": "..."
    }
  ],
  "next_cursor": "..."
}
```

## Request the next page

Pass the cursor from the previous response:

```bash theme={null}
curl "https://console.layerrail.com/api/project?cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $LAYERRAIL_TOKEN"
```

## Pagination tips

* Keep processing idempotent.
* Store the last cursor only after the page succeeds.
* Expect empty pages when resources are created or deleted during a scan.
* Do not assume ordering unless an endpoint documents it.
