launchiamenterprise / keyrunner

KeyRunner: A secure, codeless VS Code extension for API testing & Designing. Features include data encryption at rest, sensitive data masking, and the innovative Playground for chaining API requests without coding
https://keyrunner.app
MIT License
9 stars 0 forks source link

Unable to run GET requests from playground when request is dependent on one of JSON object part of JSON Array from previous API response #17

Closed akhot09 closed 1 week ago

akhot09 commented 1 week ago

When we try to perform chaining of requests using “playground” option we are unable to tag query/path params of GET API request to JSON object which is part of JSON Array from previous API response in request flow. Below are detailed steps for the same.

I am using Key Runner Windows/Desktop Application - v1.0.45.0

  1. I have created a “Request Flow” with 5 requests which is needed as a part of chaining of requests as shown below in screen shot: image

a. One of GET API request need path param value from previous API call as depicted below. image

b. The Previous API call has API response in JSON Array format, and we need a particular value from JSON array to be used as path param in next API call (which is failed in above screen shot) and we have mapped field against path param as shown in below screenshot.

The below screen shot shows -- Previous API call response: 1

The below screen shot shows -- Value Mapping to Path Param in next API call: 2

Further when we try to run requests in request flow via playground option, later API request (APIRequest-Get4) fails as it didn’t fetched value from previous API response (APIRequest-Get1) to mapped path parameters. So how this scenario can be achieved.

launchiamenterprise commented 1 week ago

Hi @akhot09. Please use the following format when working with arrays [0].reference

[0] being the index of the array, reference being the key.

Please use the above format and let us know if it works.

akhot09 commented 1 week ago

Hi @launchiamenterprise -- Thanks for reply! Solution provided is working for example depicted in screen shots.

launchiamenterprise commented 1 week ago

perfect , closing the issue for now. we will update the documentation