#[SOLVED] Is there a way to get an endpoint for your deployed functions.

16 messages · Page 1 of 1 (latest)

wispy marsh
#

The use case is simple. As much as I read, your deployed appwrite functions are only triggered by some appwrite event for example: making users, adding files, so and so forth. What I want is to get an api endpoint something like: https://appwrite.cloud/v1/function, which I can call from the client.

livid rock
wispy marsh
#

ohh thanks

livid rock
#

The docs linked here are for v1.1, so feel free to change if you're on a different version 😄

wispy marsh
#

yaa

#

so basically I can call this create execution api and the appwrite server would start running the function?

#

this is what I understood from the docs

livid rock
#
export async function executeTeamsFunction(id: string, mode: string, email: string) {
    try {
        if (id === '') {
            return;
        } else {
            const promise = await functions.createExecution(
                id,
                `{
                    "mode": "${mode}",
                    "email": "${email}"
                }`
            );
            return promise;
        }
    } catch (error) {
        if (error instanceof AppwriteException) {
            console.log(error.message);
        } else {
            console.log(error);
        }
    }
}```
Here's an example
wispy marsh
#

are you participating in the hackathon?

#

what are you building

livid rock
#

I'm building a patient-doctor dashboard
Please keep messages in #1072905050399191082 threads related to issues. I'd be more than happy talking about my project in the #🗂│hackathon-chat 😄 appwritepeepo

wispy marsh
#

ohh sorry.

#

atb

livid rock