Using wildcards in a Get request

Hi,

I am new to Postman, so thank you in advance for your help.

I have a Get request as supplied by a postman reseller.
https://www.xxxxxxx.com.au/api/formdataservice/GetFormText/Wagga/1/5-Jul-2021?Apikey=blablabla

This script returns very specific data regarding when the {{TTrack}} variable = Wagga and the {{TRace}} variable = 1. No Problem.

The response is a CSV file.

For my application to get the required data, I have to repeat the request several times for each TTrack and each TRace. This is somewhat time consuming.

From what I have read, if I was to leave the Get statement as:

https://www.xxxxx.com.au/api/formdataservice/GetFormText/{{TTrack}}/{{TRace}}/5-Jul-2021?Apikey=Blablabla,

the {{Track}} & {{TRace}} variables would be treated as wild cards, leaving the only criteria I need to enter being the date.

However, what this does is return a json looking script, instead of a comma separated text response in the response window. So clearly my understanding of wildcard syntax is incorrect.

Can somebody please suggest the correct syntax for wildcards or even if I am allowed to do this in this manner?

Thanks again.

Hi @jeffreygrant1, Welcome to the community!

When we have {{TRace}} or {{TRace}} in postman request URI, they will be treated as variables. If you don’t assign any value to these variables, it will be by default go as it is. I don’t think it will be treated as a wildcard in the backend of the calling API, rest you may need to check the documentation.

As you are referring that you need to iterate the values many times to find the actual value.

You may automate this, by using collection runner in postman. You may need to create a JSON or CSV file, containing a different set of data as input to the collection runner, that will iterate your request on each data set.

Hope this helps :slight_smile:

1 Like