Pagination¶
Many vManage endpoints (alarms, events, bulk statistics, large inventory listings) return one page of a larger result set. The server detects two pagination shapes from the OpenAPI spec and auto-follows them, returning a single stitched response.
Shapes¶
- scroll — Elasticsearch-style. Request param
scrollId; response carriespageInfo.scrollIdandpageInfo.hasMoreData. Used by alarms, events, bulk stats. - offset — Classic
page/pageSize(orcount/limit). Used by most configuration and inventory listings.
Behaviour¶
When pagination is engaged the response is wrapped:
{
"data": [ ...concatenated items from every page... ],
"pagination": {
"style": "scroll",
"pages_fetched": 5,
"truncated": true,
"next_cursor": {"scrollId": "DXF1Z..."}
}
}
truncated: true⇔next_cursoris non-null. To get the next batch, call the same action again withnext_cursor's fields merged intoparams— e.g.params["scrollId"] = "DXF1Z..."(scroll) orparams["page"] = 6(offset).- Non-paginated actions and explicit opt-outs return the raw response shape unchanged.
Configuration¶
sdwan:
pagination:
enabled: true # master switch
max_pages: 5 # default cap on auto-follow
page_size: null # null → use the endpoint's natural page size
Per-call overrides¶
The dispatcher recognises three reserved underscore keys in params. They
are stripped before the request is sent to vManage:
| Param | Type | Effect |
|---|---|---|
_max_pages |
int | Override max_pages for this call. |
_page_size |
int | Override page_size for this call (offset only). |
_pagination |
"off" |
Skip pagination; return the raw first page. The literal "off" is the only recognised disabling value. |
Examples¶
Fetch up to 10 pages of alarms:
Disable auto-follow for one call:
Resume from a returned cursor: