1

I have a scenario where I know the API request format and some data but not the other dynamic data, let's say it is a dynamicParameter.

Now this dynamicParameter data will keep changing and it a mandatory field so it can't be skipped.

So I have to capture the actual API requests for the given data initially and then keep using it until it changes again, and there is going to be lots of API requests hence I have to automate the capture process.

But while capturing I come across with another challenge, i.e. whenever we perform the action, the API is not seen in the browser directly, so I can't capture it from network panel or XHR.

And the application is server is using logstash and in logstash I can find the actual API requests, so I decided to capture it from logstash but most of the results I found are related to filter/extract the logs before they are stored in logstash.

So it would be a great help if anyone can suggest how to capture API requests dynamically for this application and/or how to do API Automation for this application.

  • 1 - What about reaching out for the developers and discuss with them the intended implementation instead of hacking out the requests? Probably there is OpenAPI documentation with the answers you are looking for. 2 - How does the application controller handle this "dynamic data"? – João Farias Apr 14 at 5:18
  • @JoãoFarias 1. I tried to convince them but they said they don't have time to change the implementation for now. 2. They are getting this dynamically generated data by storing it in some database/file, but they right now don't want to provide access as they think something might go wrong if they give us the access. I am trying my best to convince them to help with 2nd option at least. But I thought let me ask by the time final decision comes. – SRM21 Apr 14 at 9:21
  • 1- I didnt meant to change the implementation. I meant to talk so you can understand it better, rather than reverse-enginnering it from the actual behaviour. 2- When I said "controller" I meant as in MVC. How does this component package the response? You said the value is a configuration, so it doesn't matter for the consumers of the API the value itself, but its format (a string? a float?). – João Farias Apr 14 at 9:31
1

You can Extracting data from responses and chaining requests in postman tool. Please refer below links which may be helpful.

Extracting data from responses and chaining requests

For a dynamic parameter, you can also create any Random function and you can create and set it in environment variable if require. You can use chain request and Next request concept which is in Postman.

Another way is that you can use Proxy recording in postman to fetch actual response which may help you to create dynamic data.

With the help of Postman tool, you can extract json response or data from current api and you can also pass it in next request with the help of environment variable.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.