Pagination Methods
Pulsedive supports two pagination approaches:| Method | Best For | How It Works |
|---|---|---|
| Next Token | Most use cases | Use the next value from responses to get subsequent pages. |
| Timestamp-Based | Time-based filtering | Use the added_after parameter with TAXII date headers. |
Key Parameters
Use these parameters to control pagination:limit: Number of objects to return per page. Maximum server limit is 1000.next: Pagination token from the previous response. Used with next token pagination.added_after: Timestamp filter for time-based pagination.
more field (true/false) indicating whether additional results are available.
When more is true, use the next token or adjust added_after to continue retrieving objects.
Next Token Pagination
We recommend using thenext value returned in responses to retrieve subsequent pages of results.
- Make initial request with optional
limitparameter. - Check if
moreis set totruein the response. - Use the
nextvalue returned in the response in subsequent requests to continue fetching STIX objects as part of the same result set. - Repeat until
moreisfalse.
Example
This sample request walks you through a typical implementation.Initial Request
Make an initial request:Response
Receive a response containingmore = true and the next parameter:
Subsequent Request
Use thenext value to fetch more STIX objects:
Timestamp-Based Pagination
Use theadded_after parameter to fetch objects added after a specific timestamp.
This method is useful for incremental updates or time-based filtering.
Pulsedive includes TAXII date headers in responses to help you track which timeframes you’ve retrieved.
TAXII Date Headers
Pulsedive includes these headers in responses:X-TAXII-Date-Added-First:createdtimestamp of the earliest object in this response.X-TAXII-Date-Added-Last:createdtimestamp of the latest object in this response.
X-TAXII-Date-Added-Last as your added_after value for the next request to continue pagination.
Example
This sample request uses theadded_after filter.
Initial Request
Make an initial request:Receive Response
These headers are included in the response:Subsequent Request Using Last Timestamp
Use the value of theX-TAXII-Date-Added-Last header to get the next page:
You can also use the value of the
created timestamp of the last STIX object in the previous response or a timestamp that you specify.Implementation Tips
Use these strategies to handle pagination effectively.Error Handling
- Check for
more: falseto detect the end of results - Handle network timeouts and retry failed requests
- Validate pagination tokens before using them
Performance
- Use appropriate
limitvalues (100-1000) based on your needs - Consider caching results to avoid re-fetching the same data
- Process objects as you receive them rather than storing everything in memory