Skip to content

Instantly share code, notes, and snippets.

@techygrrrl
Created June 10, 2022 21:05
Show Gist options
  • Save techygrrrl/20a4ff990d9f6a035b1e35c85b3d1652 to your computer and use it in GitHub Desktop.
Save techygrrrl/20a4ff990d9f6a035b1e35c85b3d1652 to your computer and use it in GitHub Desktop.
Postman script to support pagination
// Assumes you have a value on the response JSON `pagination.cursor` and an environment variable `next_cursor`
// Will set this environment variable so you can use it for subsequent requests.
const responseJson = pm.response.json();
pm.environment.set("next_cursor", responseJson.pagination.cursor);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment