
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to make URL dynamic in REST connection ?
Hi Techies,
I have use case where I need to make URL dynamic which is getting used in REST connector. The sample request which we use in browser URL bar is
https://API.com/Enterprise/v1.0/sales/site/Mumbai Harbor/1336/?start_time=202001091200&end_time=202001091215
Now
if I use https://xxxxxxxxx.com/Enterprise/v1.0/sales/site/Mumbai Harbor/1336/ in URL section of REST connector and
WITH CONNECTION
( QUERY "start_time" "$(vReportStartDate)",
QUERY "end_time" "$(vReportEndDate)"
);
so it works fine but my use case say we need to make Mumbai Harbor and city code 1336 dynamic so we can use one rest connection for all cities and their sites.
Can anyone please help me to make the URL dynamic ?
Thanks in advance
Rohit
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So you currently have this defined in the WITH CONNECTION part:
WITH CONNECTION
( QUERY "start_time" "$(vReportStartDate)",
QUERY "end_time" "$(vReportEndDate)"
);
This can be added to in order to further variablize the URL:
WITH CONNECTION
(
URL "https://xxxxxxxxx.com/Enterprise/v1.0/sales/site/$(city)/$(citycode)/ "
QUERY "start_time" "$(vReportStartDate)",
QUERY "end_time" "$(vReportEndDate)"
);
Of course you'd want to nest that GET inside of a loop to loop over all the known values for $(city) and $(citycode)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So you currently have this defined in the WITH CONNECTION part:
WITH CONNECTION
( QUERY "start_time" "$(vReportStartDate)",
QUERY "end_time" "$(vReportEndDate)"
);
This can be added to in order to further variablize the URL:
WITH CONNECTION
(
URL "https://xxxxxxxxx.com/Enterprise/v1.0/sales/site/$(city)/$(citycode)/ "
QUERY "start_time" "$(vReportStartDate)",
QUERY "end_time" "$(vReportEndDate)"
);
Of course you'd want to nest that GET inside of a loop to loop over all the known values for $(city) and $(citycode)
