# Records

Records format is a paginated format which is returned for "current" state of data.

```json
{
    "records": [
        {
            "id": 4066131,
            "community_id": 235
        },
        {
            "id": 4066135,
            "community_id": 235
        }
    ],
    "pagination": {
        "next_page_info": "CNOW-AE"
    },
    "result_type": "records"
}
```

## Pagination

Single query can return at most `100` records. The pagination is done via a `cursor`.

Each query response returns `pagination` object. E.g.:
```json
   ...
   "pagination": {
        "next_page_info": "CNOW-AE"
    },
   ...
```

In order to fetch next page, you need to make same request with `page_info` paramater set to value of `next_page_info`.

When `next_page_info` is empty - it means that there is no more pages available.

### Other parameters

* `limit` - allows to change size of returned data. Maximum allowed value is `100`
* `sort_by` - allows to choose field in which order records will be returned. Note that this field must be allowed to be sorted by in the report (it's returned in `Metadata` endpoint as `sortable_fields`
* `sort_direction` - allows to change sorting direction. Allowed values: `ASC`, `DESC`
