How do I call my own API endpoint from another endpoint?
![Ambroise](https://us.v-cdn.net/6037124/uploads/userpics/CQK66977Q335/nTGIPZ4H8MVBY.jpg)
Is there a simple way to call an internal endpoint from another one?
Or must I use a "Call external API" and forward everything manually? (auth token, etc.)
Best Answer
-
Is it in the same workspace? I would consider utilizing Custom Functions. You can call custom functions from any function stack in the same workspace and easily convert an existing API endpoint into a custom function.
Answers
-
Correct, currently an external api request is how you'd contact one of your other APIs, noting that you can copy the cURL from the API endpoint that you are looking to contact's result. You can then paste this cURL into the external API request of your new function easily configuring the request including used inputs.
-
Yes, it's in the same workspace, using a custom function might be the right approach, thanks.
-
You can just use the endpoint url from the function stack that you're targeting and get the example json from testrunning that function stack. just make sure it's published
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