Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination setup code-snippet for Data Stream integration #1110

Conversation

isaac-vicentini
Copy link
Contributor

This Pull Request adds a code-snippet and corresponding README for managing pagination in a Data Stream integration.

  • The script calculates pagination variables (limit, offset, getNextPage) based on the total number of records returned by the API.
  • The README explains the purpose of the script and key variables.
  • This contribution is designed to help developers handle large datasets efficiently by managing paginated API requests.

All changes are contained within the 'Data Stream' folder, with a script file pagination-setup.js and documentation in README.md.

- Created a script to handle pagination for Data Stream integrations.
- The script calculates the next offset based on the limit and total number of records.
- It determines whether to make an additional API call for the next page of results or stop.
- This script is useful for managing large datasets in paginated API requests.
@snamjosh snamjosh self-assigned this Oct 3, 2024
@snamjosh snamjosh merged commit efe4c08 into ServiceNowDevProgram:main Oct 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants