Forum Discussion

dingram's avatar
dingram
New Contributor
5 years ago

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

 

  • To create test steps, one have to either someone code to generate or create them manually.
  • nmrao's avatar
    nmrao
    Champion Level 3
    To create test steps, one have to either someone code to generate or create them manually.
    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thanks Rao!

       

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