Ask a Question

Dynamically call REST endpoints

SOLVED
dingram
New Contributor

Dynamically call REST endpoints

Hello. I have an API that needs to be tested and it looks something like this...

 

/animals

/animals/{type}

/animals/{type}/species

/animals/{type}/species/{speciesId}

 

and so on. In total I have about 75 endpoints that need to be tested. For all of these I only need to test GET requests so the only difference between each request is the endpoint being called and the URI parameters being passed. Of  course I could create a test step for all 75 endpoints then have a test step for each one, but that would obviously be very tedious to set up.


What I'd like to do, if possible is have a single REST request to which I pass the entire URI, so I first call /animals, then /animals/{type} etc.. Is there any way to do this in ReadyAPI? I'm also open to possible alternative solutions.


Thanks,

 

--Drew

 

3 REPLIES 3
nmrao
Champion Level 3

To create test steps, one have to either someone code to generate or create them manually.


Regards,
Rao.
sonya_m
SmartBear Alumni (Retired)

Thanks Rao!

 

Hi @dingram ! Does this answer your question, or would you like to clarify more?


Sonya Mihaljova
Community and Education Specialist

It does. Thanks.

cancel
Showing results for 
Search instead for 
Did you mean: