Back

[Solved] How to include path when calling Appwrite functions in local self hosted environment

  • 0
  • Functions
  • Webhooks
Triple Gelato
24 Nov, 2023, 23:20

In local self hosted environment, functions can be invoked by

TypeScript
curl -X "POST" "https://localhost/v1/functions/{functionId}/executions" \
     -H 'X-Appwrite-Project: {projectId}'

However I can't find a way to specify different paths, please help.

TL;DR
The user was initially asking about including a path when calling Appwrite functions in a self-hosted environment. They mentioned trying out custom function domains but found it complicated to get the certificates working. The solution suggested was to use custom function domains. The user later clarified that they meant in a locally hosted environment and updated the post title. Another user clarified that this issue didn't depend on self-hosted vs cloud. To include a path when calling Appwrite functions in a local self-hosted environment, the user was instructed to use the following curl command: ``` curl -X "POST" "https://localhost/v1/functions/{function
Drake
25 Nov, 2023, 00:41

This doesn't really have anything to do with self-hosted vs cloud.

If you're calling the Create execution API, you would set the path param. See: https://appwrite.io/docs/references/cloud/client-rest/functions#createExecution

Triple Gelato
26 Nov, 2023, 01:07

How to include path when calling Appwrite functions in local self hosted environment

Triple Gelato
26 Nov, 2023, 01:08

Thanks for the answer. What I meant here was actually in locally hosted environment. For example in Appwrite cloud we can use https://{functionId}.appwrite.global and append path directly to it. Updated post title.

Triple Gelato
26 Nov, 2023, 01:08

[Solved] How to include path when calling Appwrite functions in local self hosted environment

Drake
26 Nov, 2023, 01:23

Technically, you can set up this auto generated function domain in your self hosted environment too but its a bit convoluted to get the certificates working.

An easy alternative is to use custom function domains.

Triple Gelato
27 Nov, 2023, 00:37

Tried out custom function domains and they are great, thanks for the help

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more