cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic passing in REST API

Harsha3
New Contributor III

Hi ,

I was trying to invoke the REST API dynamically . Let me share my requirement , I have on REST API in place which gives certain information of each country with respect to the country_id . Each country_id is unique , so instead of placing the country_id all the time in a pipeline , I thought of getting it done by passing it from pipeline execute . However it throws error . Is there only a way to achieve this is by using query parameters?

image -Sample Rest

Sample harcoded API:

image

In the place of CID highlighted in yellow we have different unique values . Can I know is there any way to achieve this dynamically instead of changing that unique value every time after the previous execution .

Thanks

7 REPLIES 7

Harsha3
New Contributor III

Hi ,

After trying few attempts I was able to do it dynamically using expression builder .

Pretty
New Contributor III

@Harsha3
can you share expression how u tried with dynamically?

Hi @Pretty,

Which field do you want to dynamically pass to the REST Get snap ?

Pretty
New Contributor III

@j.angelevski
This is URL passing in rest get snap
https://elastic.snaplogic.com/api/1/rest/public/runtime/org ?client name= comm@snaplogic.com
but I have n number of client name which we are passing in child pipeline
how can we call all the client name dynamically