How do I add a path variable in my external api request?
Hi! I'd like to know how to set a path variable for my url in my external api request.
For example I have this URL:
https://www.pdfotter.com/api/v1/pdf_templates/:templateId/fill?
and for the templateId it has a value of tem_1234567 for example.
I can't set it as a param since it will turn the response url into:
https://www.pdfotter.com/api/v1/pdf_templates/:templateId/fill?[templateId]=tem_1234567
which gives me a 404 error. Setting it as a header doesn't work as well.
The correct response url should just be:
https://www.pdfotter.com/api/v1/pdf_templates/:templateId/fill?
Thank you so much!
Best Answer
-
I'd leave the “colon” version of the url in as a template, and apply the “replace” filter (not regex-replace) to substitute “tem_1234567" for “:templateId”
Answers
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