Functions 13 endpoints

DELETE /functions/{functionId}/deployments/{deploymentId}

Delete a code deployment by its unique ID.

operationId: Functions_deleteDeployment

Parameters

Name In Required Type Description
functionId path required string

Function ID.

deploymentId path required string

Deployment ID.

Responses

204

No content

DELETE /functions/{functionId}/deployments/{deploymentId}
GET /functions/{functionId}/deployments/{deploymentId}

Get a code deployment by its unique ID.

operationId: Functions_getDeploymentById

Parameters

Name In Required Type Description
functionId path required string

Function ID.

deploymentId path required string

Deployment ID.

Responses

200

Deployment

GET /functions/{functionId}/deployments/{deploymentId}
PATCH /functions/{functionId}/deployments/{deploymentId}

Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.

operationId: Functions_updateDeploymentFunctionCode

Parameters

Name In Required Type Description
functionId path required string

Function ID.

deploymentId path required string

Deployment ID.

Responses

200

Function

PATCH /functions/{functionId}/deployments/{deploymentId}
POST /functions/{functionId}/deployments/{deploymentId}/builds/{buildId}

Create a new build for an Appwrite Function deployment. This endpoint can be used to retry a failed build.

operationId: Functions_createBuild

Parameters

Name In Required Type Description
functionId path required string

Function ID.

deploymentId path required string

Deployment ID.

buildId path required string

Build unique ID.

Responses

204

No content

POST /functions/{functionId}/deployments/{deploymentId}/builds/{buildId}
GET /functions/{functionId}/deployments/{deploymentId}/download

Get a Deployment’s contents by its unique ID. This endpoint supports range requests for partial or streaming file download.

operationId: Functions_getDeploymentContents

Parameters

Name In Required Type Description
functionId path required string

Function ID.

deploymentId path required string

Deployment ID.

Responses

200

File

GET /functions/{functionId}/deployments/{deploymentId}/download
GET /functions/{functionId}/executions

Get a list of all the current user function execution logs. You can use the query params to filter your results.

operationId: Functions_listExecutions

Parameters

Name In Required Type Description
functionId path required string

Function ID.

queries query optional array

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, responseStatusCode, duration

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Executions List

GET /functions/{functionId}/executions
POST /functions/{functionId}/executions

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.

operationId: Functions_triggerExecution

Parameters

Name In Required Type Description
functionId path required string

Function ID.

Request Body

application/json
schema FunctionsTriggerExecutionRequest
Property Type Required
body string optional
path string optional
async boolean optional
method string optional
headers object optional

Responses

201

Execution

POST /functions/{functionId}/executions
GET /functions/{functionId}/executions/{executionId}

Get a function execution log by its unique ID.

operationId: Functions_getExecutionLog

Parameters

Name In Required Type Description
functionId path required string

Function ID.

executionId path required string

Execution ID.

Responses

200

Execution

GET /functions/{functionId}/executions/{executionId}
GET /functions/{functionId}/variables

Get a list of all variables of a specific function.

operationId: Functions_listVariables

Parameters

Name In Required Type Description
functionId path required string

Function unique ID.

Responses

200

Variables List

GET /functions/{functionId}/variables
POST /functions/{functionId}/variables

Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.

operationId: Functions_createVariable

Parameters

Name In Required Type Description
functionId path required string

Function unique ID.

Request Body

application/json
schema FunctionsCreateVariableRequest
Property Type Required
key string required
value string required

Responses

201

Variable

POST /functions/{functionId}/variables
DELETE /functions/{functionId}/variables/{variableId}

Delete a variable by its unique ID.

operationId: Functions_deleteVariableById

Parameters

Name In Required Type Description
functionId path required string

Function unique ID.

variableId path required string

Variable unique ID.

Responses

204

No content

DELETE /functions/{functionId}/variables/{variableId}
GET /functions/{functionId}/variables/{variableId}

Get a variable by its unique ID.

operationId: Functions_getVariableById

Parameters

Name In Required Type Description
functionId path required string

Function unique ID.

variableId path required string

Variable unique ID.

Responses

200

Variable

GET /functions/{functionId}/variables/{variableId}
PUT /functions/{functionId}/variables/{variableId}

Update variable by its unique ID.

operationId: Functions_updateVariableById

Parameters

Name In Required Type Description
functionId path required string

Function unique ID.

variableId path required string

Variable unique ID.

Request Body

application/json
schema FunctionsUpdateVariableByIdRequest
Property Type Required
key string required
value string optional

Responses

200

Variable

PUT /functions/{functionId}/variables/{variableId}

Graphql 2 endpoints

POST /graphql

Execute a GraphQL mutation.

operationId: Graphql_executeMutation

Responses

200

Any

POST /graphql
POST /graphql/mutation

Execute a GraphQL mutation.

operationId: Graphql_executeMutation

Responses

200

Any

POST /graphql/mutation

Health 23 endpoints

GET /health

Check the Appwrite HTTP server is up and responsive.

operationId: Health_checkServerStatus

Responses

200

Health Status

GET /health
GET /health/anti-virus

Check the Appwrite Antivirus server is up and connection is successful.

operationId: Health_checkAntivirusStatus

Responses

200

Health Antivirus

GET /health/anti-virus
GET /health/cache

Check the Appwrite in-memory cache servers are up and connection is successful.

operationId: Health_checkCacheStatus

Responses

200

Health Status

GET /health/cache
GET /health/certificate

Get the SSL certificate for a domain

operationId: Health_getSslCert

Parameters

Name In Required Type Description
domain query optional string

string

Responses

200

Health Certificate

GET /health/certificate
GET /health/db

Check the Appwrite database servers are up and connection is successful.

operationId: Health_checkDbStatus

Responses

200

Health Status

GET /health/db
GET /health/pubsub

Check the Appwrite pub-sub servers are up and connection is successful.

operationId: Health_checkPubsubServerStatus

Responses

200

Health Status

GET /health/pubsub
GET /health/queue

Check the Appwrite queue messaging servers are up and connection is successful.

operationId: Health_getQueueStatus

Responses

200

Health Status

GET /health/queue
GET /health/queue/builds

Get the number of builds that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getBuildsQueue

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/builds
GET /health/queue/certificates

Get the number of certificates that are waiting to be issued against Letsencrypt in the Appwrite internal queue server.

operationId: Health_queueCertificatesGet

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/certificates
GET /health/queue/databases

Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getDatabasesQueue

Parameters

Name In Required Type Description
name query optional string

Queue name for which to check the queue size

threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/databases
GET /health/queue/deletes

Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getDeletesQueue

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/deletes
GET /health/queue/failed/{name}

Returns the amount of failed jobs in a given queue.

operationId: Health_getFailedJobs

Parameters

Name In Required Type Description
name path required string

The name of the queue

threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/failed/{name}
GET /health/queue/functions

Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_functionsQueueCount

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/functions
GET /health/queue/logs

Get the number of logs that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getQueueLogs

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/logs
GET /health/queue/mails

Get the number of mails that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getMailQueueSize

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/mails
GET /health/queue/messaging

Get the number of messages that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getQueueMessaging

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/messaging
GET /health/queue/migrations

Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getMigrationsQueue

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/migrations
GET /health/queue/usage

Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getQueueUsage

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/usage
GET /health/queue/usage-dump

Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getQueueUsageDump

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/usage-dump
GET /health/queue/webhooks

Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.

operationId: Health_getWebhooksQueue

Parameters

Name In Required Type Description
threshold query optional integer

Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.

Responses

200

Health Queue

GET /health/queue/webhooks
GET /health/storage

Check the Appwrite storage device is up and connection is successful.

operationId: Health_checkStorageStatus

Responses

200

Health Status

GET /health/storage
GET /health/storage/local

Check the Appwrite local storage device is up and connection is successful.

operationId: Health_checkLocalStorageStatus

Responses

200

Health Status

GET /health/storage/local
GET /health/time

Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The Network Time Protocol (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.

operationId: Health_getTimeInformation

Responses

200

Health Time

GET /health/time

Locale 8 endpoints

GET /locale

Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.

(IP Geolocation by DB-IP)

operationId: Locale_getUserLocaleData

Responses

200

Locale

GET /locale
GET /locale/codes

List of all locale codes in ISO 639-1.

operationId: Locale_listCodes

Responses

200

Locale codes list

GET /locale/codes
GET /locale/continents

List of all continents. You can use the locale header to get the data in a supported language.

operationId: Locale_listContinents

Responses

200

Continents List

GET /locale/continents
GET /locale/countries

List of all countries. You can use the locale header to get the data in a supported language.

operationId: Locale_listCountries

Responses

200

Countries List

GET /locale/countries
GET /locale/countries/eu

List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.

operationId: Locale_listEuCountries

Responses

200

Countries List

GET /locale/countries/eu
GET /locale/countries/phones

List of all countries phone codes. You can use the locale header to get the data in a supported language.

operationId: Locale_listPhoneCodes

Responses

200

Phones List

GET /locale/countries/phones
GET /locale/currencies

List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.

operationId: Locale_listCurrenciesData

Responses

200

Currencies List

GET /locale/currencies
GET /locale/languages

List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.

operationId: Locale_getLanguageList

Responses

200

Languages List

GET /locale/languages

Messaging 4 endpoints

GET /messaging/messages

Get a list of all messages from the current Appwrite project.

operationId: Messaging_listMessages

Parameters

Name In Required Type Description
queries query optional array

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: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType

search query optional string

Search term to filter your list results. Max length: 256 chars.

Responses

200

Message list

GET /messaging/messages
POST /messaging/messages/email

Create a new email message.

operationId: Messaging_createEmailMessage

Request Body

application/json
schema MessagingCreateEmailMessageRequest
Property Type Required
cc array optional
bcc array optional
html boolean optional
draft boolean optional
users array optional
topics array optional
content string required
subject string required
targets array optional
messageId string required
attachments array optional
scheduledAt string optional

Responses

201

Message

POST /messaging/messages/email
PATCH /messaging/messages/email/{messageId}

Update an email message by its unique ID.

operationId: Messaging_updateEmailById

Parameters

Name In Required Type Description
messageId path required string

Message ID.

Request Body

application/json
schema MessagingUpdateEmailByIdRequest
Property Type Required
cc array optional
bcc array optional
html boolean optional
draft boolean optional
users array optional
topics array optional
content string optional
subject string optional
targets array optional
scheduledAt string optional

Responses

200

Message

PATCH /messaging/messages/email/{messageId}
POST /messaging/messages/push

Create a new push notification.

operationId: Messaging_createPushNotification

Request Body

application/json
schema MessagingCreatePushNotificationRequest
Property Type Required
tag string optional
body string required
data object optional
icon string optional
badge string optional
color string optional
draft boolean optional
image string optional
sound string optional
title string required
users array optional
action string optional
topics array optional
targets array optional
messageId string required
scheduledAt string optional

Responses

201

Message

POST /messaging/messages/push
Load more endpoints