How do I call my own API endpoint from another endpoint?

Options

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.)

Tagged:

Best Answer

Answers

  • Lachlan
    Lachlan Administrator

    ADMIN

    Options

    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.

  • Ambroise
    Ambroise Member
    Options

    Yes, it's in the same workspace, using a custom function might be the right approach, thanks.

  • tessus
    tessus Member
    Options

    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