Docs
Skip to content
post

Create execution

Endpoint

posthttps://<REGION>.cloud.appwrite.io/v1/functions/{functionId}/executions

Description

Required scopes

executions.writeexecution.write

Authentication

Initialize the Appwrite client with setProject() and ensure the user is signed in. The SDK sends the session header automatically after login.

Path

string
Required

Body

string
boolean
string
enum
object
string
Status
Content type
201
application/json

Execution

Name
Type
Description
string
string
string
arrayof string
string
string
http | schedule | event
waiting | processing | completed | failed | scheduled
string
string
arrayof Headers

Object type

integer
string
arrayof Headers

Object type

string
string
number
string
JavaScript
import { Client, Functions, ExecutionMethod } from "appwrite";
const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const functions = new Functions(client);
const result = await functions.createExecution({
functionId: '<FUNCTION_ID>',
body: '<BODY>', // optional
async: false, // optional
xpath: '<PATH>', // optional
method: ExecutionMethod.GET, // optional
headers: {}, // optional
scheduledAt: '<SCHEDULED_AT>' // optional
});
console.log(result);