Create Execution
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/functions/{functionId}/executions
Description
Trigger a function execution. The returned object will return you the current execution status. You can ping the Get Execution endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
Required scopes
Authentication
setProject() and ensure the user is signed in. The SDK sends the session header automatically after login.Rate limit
Path
Function ID.
Body
String of custom data to send to function.
Execute code asynchronously. Default value is true.
Execution
Execution ID.
Execution creation date in Unix timestamp.
Execution update date in Unix timestamp.
Execution read permissions.
Function ID.
The trigger that caused the function to execute. Possible values can be: http, schedule, or event.
The status of the function execution. Possible values can be: waiting, processing, completed, or failed.
The script status code.
The script response output string. Logs the last 4,000 characters of the execution response output.
The script stderr output string. Logs the last 4,000 characters of the execution stderr output
The script execution time in seconds.
import Appwrite
func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID let functions = Functions(client) let execution = try await functions.createExecution( functionId: "[FUNCTION_ID]" )
print(String(describing: execution)}Functions
Create Execution
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/functions/{functionId}/executions
Description
Trigger a function execution. The returned object will return you the current execution status. You can ping the Get Execution endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
Required scopes
Authentication
setProject() and ensure the user is signed in. The SDK sends the session header automatically after login.Rate limit
Path
Function ID.
Body
String of custom data to send to function.
Execute code asynchronously. Default value is true.
Execution
Execution ID.
Execution creation date in Unix timestamp.
Execution update date in Unix timestamp.
Execution read permissions.
Function ID.
The trigger that caused the function to execute. Possible values can be: http, schedule, or event.
The status of the function execution. Possible values can be: waiting, processing, completed, or failed.
The script status code.
The script response output string. Logs the last 4,000 characters of the execution response output.
The script stderr output string. Logs the last 4,000 characters of the execution stderr output
The script execution time in seconds.
import Appwrite
func main() async throws { let client = Client() .setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint .setProject("5df5acd0d48c2") // Your project ID let functions = Functions(client) let execution = try await functions.createExecution( functionId: "[FUNCTION_ID]" )
print(String(describing: execution)}