Pagination
Several of the endpoints in the Fivetran API return a collection of items, such as a list of connectors or users. These endpoints return data in portions or "pages." Thus to fetch the entire collection you need to use paging. We support cursor-based pagination.
Query parameters
Each collection endpoint supports the following query parameters:
Name | Description |
---|---|
cursor | Paging cursor, if not provided the first page of items is returned. Start any query without providing a cursor in order to access it. |
limit | Number of records to fetch per page. Accepts a number in the range 1..1000; the default value is 100. |
Response
The response of these endpoints has the following fields:
Name | Description |
---|---|
items | The collection of items requested |
next_cursor | The value of the cursor parameter for the next page |
For example, the following request fetches two groups starting from the specified cursor:
GET https://api.fivetran.com/v1/groups?cursor=eyJza2lwIjoxfQ&limit=2
The response contains the requested items along with the cursor for the next page:
HTTP 200 OK
{
"code": "Success",
"data": {
"items": [
{
"id": "projected_sickle",
"name": "Staging",
"created_at": "2018-12-20T11:59:35.089589Z"
},
{
"id": "schoolmaster_heedless",
"name": "Production",
"created_at": "2019-01-08T19:53:52.185146Z"
}
],
"next_cursor": "eyJza2lwIjozfQ"
}
}
To fetch the next page of items, pass the next_cursor
value to the cursor
parameter:
GET https://api.fivetran.com/v1/groups?cursor=eyJza2lwIjozfQ
If the next_cursor
field is missing, there are no more items left to fetch:
HTTP 200 OK
{
"code": "Success",
"data": {
"items": []
}
}