Web API with dynamic parameters

Hello everyone
I’m using Http request and the parameters are dynamic
for example :
https://swapi.dev/api/films/1/
this API give me the information about the first film of the list
what if i want to have the parameters of every film on the list one by one
Is it possible to have a dynamic Endpoint ? what should i do ?

Hello @dhouha.cherif,

You mean you want to change the number present at the last of the url dynamically ?
If yes follow the below steps:-
While counter <= desiredNumber

  1. Assign a string variable counter = 1
    2 Assign the url in a string variable =“https://swapi.dev/api/films/“+counter.ToString+”/
    3.Assign counter = counter+1

Thanks,
Sanjit

1 Like

Hello @dhouha.cherif
Kindly refer to this thread, its may helps you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.