iHub — Paginated REST Calls (Quick Guide)
iHub – Paginated REST Calls
This page explains how to configure iHub to retrieve paginated data from REST APIs. It includes a quick setup, field-by-field guidance for each pagination type, when pagination stops, and real-world examples (Slack, Insight, Confluence, Jira).
Quick Setup
Action | |
|---|---|
| 1 | Enter the endpoint URL (omit the page/offset parameter) |
| 2 | Select the pagination option |
| 3 | Add pagination variables — these are appended to the URL |
| 4 | Add a Breaking Path — defines when pagination stops |
| 5 | Additional Value / Default |
Pagination Variables
The pagination variables are evaluated and appended to the URL for each request.
1 — Name of the variable (e.g., page, offset, limit, cursor)
2 — Path or value for the variable (literal value or JSONPath)
3 — Type: how iHub evaluates the variable
5— Default/additional value (depends on the type)
Supported types:
AUTO INCREMENTED
FIXED VALUE
RESPONSE BASED VALUE
NEXT URL VALUE
BODY PAGINATION
AUTO INCREMENTED
Automatically increases the variable value with each request until the breaking condition is met.
1 Name: e.g.,
page(oroffset)2 Value: start value, e.g.,
13 Type:
AUTO_INCREMENTED5Additional: increment step, e.g.,
100
Resolves to:
Request 1: http://server-url.com?page=1
Request 2: http://server-url.com?page=101
Request 3: http://server-url.com?page=201Common usage: Use with an offset parameter.
FIXED VALUE
Keeps the same value on every request.
1 Name: e.g.,
limit2 Value: fixed value, e.g.,
1003 Type:
FIXED_VALUE5Additional: ignored
Resolves to:
Request 1: http://server-url.com?limit=100
Request 2: http://server-url.com?limit=100
Request 3: http://server-url.com?limit=100Common usage: Page size limiter such as limit.
RESPONSE BASED VALUE
Evaluates the next-page value from the previous response using a JSONPath expression. If evaluation fails, the additional value is used as default.
1 Name: e.g.,
cursor2 Value: JSONPath, e.g.,
$.metadata.next_cursor3 Type:
RESPONSE_BASED_VALUE5Additional: default value (often blank)
Sample response:
{
"results": [...],
"metadata": {
"next_cursor": "qwertyu12345"
}
}Resolves to:
Request 1: http://server-url.com?cursor=default_value
Request 2: http://server-url.com?cursor=qwertyu12345Common usage: APIs that return a next-page cursor.
NEXT URL VALUE
Extracts the full next-page URL from the response and replaces the request URL entirely.
1 Name:
PAGINATE_URL2 Value: JSONPath to the next URL
3 Type:
NEXT_URL_VALUE
Example flow:
Initial URL:
https://rixter.se/rest/api/helloResponse contains next:
https://rixter.se/rest/api/hello?cursor=token123Set variable name to
PAGINATE_URLand provide the JSONPath to that URL.
BODY PAGINATION
Uses the response body to determine whether to request the next page (e.g., end-cursor logic).
1 Name: variable name used in the body
3 Type:
BODY_PAGINATION5Additional: optional start value (leave empty to start with an empty/first value)
2 Value: JSONPath to the next-page token in the response
Example: JSONPath $.data.snappableConnection.pageInfo.endCursor (Rubrik).
When Pagination Stops
Condition | Description |
|---|---|
Non-2XX status | Any HTTP status other than 2XX stops pagination |
Duplicate response | Same result as the previous page |
Empty response | Empty body, empty object |
Breaking Path empty | The configured Breaking Path evaluates to empty/ |
Example: With a Breaking Path of $.results, pagination stops as soon as results evaluates to an empty array in the previous response.
Real-World Examples
API | What it does | Key detail |
|---|---|---|
Slack users | Retrieves all Slack users | Cursor JSONPath: |
Insight | Get objects from Insight | Use type appropriate to target endpoint (often cursor or offset) |
Confluence | Get spaces | Configure limit/offset or next link based on REST version |
Jira | Bulk operations over large result sets |
Next Steps
Logs & Data Processing — learn how to use responses effectively