1
Having an env var point to an attribute of either of multiple responses
Source: Kong/insomnia#3592 · opened by @AmirShitrit
My problem is that I'm trying to test a paging endpoint where paging is done using a continuation token (as opposed to using skip and limit params). In this scenario, requesting the first page not only returns the results, but also a token pointing to the next page. The second page will be requested using the token retrieved from the previous response.
Today, if I want to iterate through N pages, I'll have to create N distinct requests, each retrieving the token from its predecessor.
The solution I'm suggesting, is to have an env var point to response X's attribute and to fallback to response Y's attribute if X hasn't ran yet (being the second/third/... page and Y being the first page).
An alternative would be to enable running custom scripts.
Today, if I want to iterate through N pages, I'll have to create N distinct requests, each retrieving the token from its predecessor.
The solution I'm suggesting, is to have an env var point to response X's attribute and to fallback to response Y's attribute if X hasn't ran yet (being the second/third/... page and Y being the first page).
An alternative would be to enable running custom scripts.
No pledges yet. Be the first to back this.
Comments
Similar requests
Collection Specific Environment Variables Superseding Active Environment Variables
2 votes · 0 comments
Add ability to edit variable value
0 votes · 0 comments
Redesign the environment variables
1 vote · 0 comments
Right Click Set Environment Variables
2 votes · 0 comments
JSONPath/XPath access to Environment Variables
1 vote · 0 comments
No comments yet.