The Functions service allows you to create custom behaviour that can be triggered by any supported Appwrite system events or by a predefined schedule.
Appwrite Cloud Functions lets you automatically run backend code in response to events triggered by Appwrite or by setting it to be executed in a predefined schedule. Your code is stored in a secure way on your Appwrite instance and is executed in an isolated environment.
You can learn more by following our Cloud Functions tutorial.
https://cloud.appwrite.io/v1
List Executions
Get a list of all the current user function execution logs. You can use the query params to filter your results.
Request
functionId requiredFunction ID.
queries Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, statusCode, duration
search Search term to filter your list results. Max length: 256 chars.
Response
200
GET /functions/{functionId}/executions
GET /v1/functions/{functionId}/executions HTTP/1.1
Host: HOSTNAME
Content-Type: application/json
X-Appwrite-Response-Format: 1.0.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...
Create Execution
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.
Request
functionId requiredFunction ID.
data String of custom data to send to function.
async Execute code in the background. Default value is false.
Response
201
Rate limits
This endpoint is rate limited. You can only make a limited number of request to his endpoint within a specific time frame.
The limit is applied for each unique limit key.
Time frameAttemptsKey1 minutes 60 requests IP + USER ID
POST /functions/{functionId}/executions
POST /v1/functions/{functionId}/executions HTTP/1.1
Host: HOSTNAME
Content-Type: application/json
X-Appwrite-Response-Format: 1.0.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...
{
"data": "[DATA]",
"async": false
}
Get Execution
Get a function execution log by its unique ID.
Request
functionId requiredFunction ID.
executionId requiredExecution ID.
Response
200
GET /functions/{functionId}/executions/{executionId}
GET /v1/functions/{functionId}/executions/{executionId} HTTP/1.1
Host: HOSTNAME
Content-Type: application/json
X-Appwrite-Response-Format: 1.0.0
X-Appwrite-Project: 5df5acd0d48c2
X-Appwrite-JWT: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...