External API - URL Dynamic
Options
![Mauro Mequelussi-1595850](https://us.v-cdn.net/6037124/user_avatars/1595850.jpg)
Mauro Mequelussi-1595850
Member ✭
https://api.domain.com/v1/io/6109dbc4946c8b7f5c10dc20/chats
6109dbc4946c8b7f5c10dc20 - is a variable parameter of an external api call
https://api.domain.com/v1/io//chats
How do I set a dynamic value in the url of an external api call instead of a fixed one, as shown in the examples below:
https://api.domain.com/v1/io/6109dbc4946c8b7f5c10dc20/chats
https://api.domain.com/v1/io/90njas9a8s18281902kjnnnjnj/chats
https://api.domain.com/v1/io/kasj98890s8ansklans990000/chats
https://api.domain.com/v1/io/610klsja9199923kansjkanj20/chats
6109dbc4946c8b7f5c10dc20 - is a variable parameter of an external api call
https://api.domain.com/v1/io//chats
How do I set a dynamic value in the url of an external api call instead of a fixed one, as shown in the examples below:
https://api.domain.com/v1/io/6109dbc4946c8b7f5c10dc20/chats
https://api.domain.com/v1/io/90njas9a8s18281902kjnnnjnj/chats
https://api.domain.com/v1/io/kasj98890s8ansklans990000/chats
https://api.domain.com/v1/io/610klsja9199923kansjkanj20/chats
Comments
-
I would use the sprintf filter to use variable substitution. You can combine this with the variable %s and add whatever dynamic variable or input as an argument on the filter:
For example:
URL: https://api.domain.com/v1/io/%s/chats
Add Filter: sprintf <> argument: input: device
[Screenshot_2021-08-09_17-31-44.png]
Result is dynamic URL
[Screenshot_2021-08-09_17-31-47.png] -
Thank you.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback