# Paging, dates and ids

> How lists come back, and the formats used everywhere.

## Paging

Lists that can be long take `offset` and `limit` and answer with:

```json
{
  "data": [],
  "has_more": true,
  "next_offset": 50
}
```

Pass `next_offset` as the next request's `offset` until `has_more` is `false`:

**Python**

```python
def all_items(api, project_id):
    offset = 0
    while True:
        page = api.get(f"/projects/{project_id}/items", params={"offset": offset, "limit": 100}).json()
        yield from page["data"]
        if not page["has_more"]:
            return
        offset = page["next_offset"]
```

**JavaScript**

```javascript
async function* allItems(projectId) {
  let offset = 0;
  for (;;) {
    const res = await fetch(`${base}/projects/${projectId}/items?offset=${offset}&limit=100`, { headers });
    const page = await res.json();
    yield* page.data;
    if (!page.has_more) return;
    offset = page.next_offset;
  }
}
```

| List | Default | Most per page |
| --- | --- | --- |
| Most lists | 50 | 100 |
| Content (`/v1/content`) | 30 | 100 |
| Automation runs | 25, newest first, with `limit` only | 200 |
| People | All of them | 200 |
| Job roles, playbooks, KPIs | All of them | |

## Formats

- **Ids** are UUID strings.
- **Dates** are `YYYY-MM-DD`, like `2026-12-05`.
- **Times** are ISO 8601 with a UTC offset, like `2026-11-21T15:04:05+00:00`.
- **Links**: anything that can be opened in the app has a `url` field.
- **New fields** can appear in answers at any time. Ignore fields you don't know. See the [changelog](https://developers.playbookops.ai/changelog).
