Properties
NAME | TYPE | DESCRIPTION |
$id | string | Function ID. |
$createdAt | string | Function creation date in ISO 8601 format. |
$updatedAt | string | Function update date in ISO 8601 format. |
execute | array | Execution permissions. |
name | string | Function name. |
enabled | boolean | Function enabled. |
live | boolean | Is the function deployed with the latest configuration? This is set to false if you've changed an environment variables, entrypoint, commands, or other settings that needs redeploy to be applied. When the value is false, redeploy the function to update it with the latest configuration. |
logging | boolean | Whether executions will be logged. When set to false, executions will not be logged, but will reduce resource used by your Appwrite project. |
runtime | string | Function execution runtime. |
deployment | string | Function's active deployment ID. |
scopes | array | Allowed permission scopes. |
vars | array | Function variables. Can be one of: |
events | array | Function trigger events. |
schedule | string | Function execution schedult in CRON format. |
timeout | integer | Function execution timeout in seconds. |
entrypoint | string | The entrypoint file used to execute the deployment. |
commands | string | The build command used to build the deployment. |
version | string | Version of Open Runtimes used for the function. |
installationId | string | Function VCS (Version Control System) installation id. |
providerRepositoryId | string | VCS (Version Control System) Repository ID |
providerBranch | string | VCS (Version Control System) branch name |
providerRootDirectory | string | Path to function in VCS (Version Control System) repository |
providerSilentMode | boolean | Is VCS (Version Control System) connection is in silent mode? When in silence mode, no comments will be posted on the repository pull or merge requests |
specification | string | Machine specification for builds and executions. |
Example
JSON
{
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"execute": "users",
"name": "My Function",
"enabled": false,
"live": false,
"logging": false,
"runtime": "python-3.8",
"deployment": "5e5ea5c16897e",
"scopes": "users.read",
"vars": [
{
"$id": "5e5ea5c16897e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"key": "API_KEY",
"value": "myPa$$word1",
"resourceType": "function",
"resourceId": "myAwesomeFunction"
}
],
"events": "account.create",
"schedule": "5 4 * * *",
"timeout": 300,
"entrypoint": "index.js",
"commands": "npm install",
"version": "v2",
"installationId": "6m40at4ejk5h2u9s1hboo",
"providerRepositoryId": "appwrite",
"providerBranch": "main",
"providerRootDirectory": "functions/helloWorld",
"providerSilentMode": false,
"specification": "s-0.5vcpu-512mb"
}
JSON
{
"_id": "5e5ea5c16897e",
"_createdAt": "2020-10-15T06:38:00.000+00:00",
"_updatedAt": "2020-10-15T06:38:00.000+00:00",
"execute": "users",
"name": "My Function",
"enabled": false,
"live": false,
"logging": false,
"runtime": "python-3.8",
"deployment": "5e5ea5c16897e",
"scopes": "users.read",
"vars": [
{
"_id": "5e5ea5c16897e",
"_createdAt": "2020-10-15T06:38:00.000+00:00",
"_updatedAt": "2020-10-15T06:38:00.000+00:00",
"key": "API_KEY",
"value": "myPa$$word1",
"resourceType": "function",
"resourceId": "myAwesomeFunction"
}
],
"events": "account.create",
"schedule": "5 4 * * *",
"timeout": 300,
"entrypoint": "index.js",
"commands": "npm install",
"version": "v2",
"installationId": "6m40at4ejk5h2u9s1hboo",
"providerRepositoryId": "appwrite",
"providerBranch": "main",
"providerRootDirectory": "functions/helloWorld",
"providerSilentMode": false,
"specification": "s-0.5vcpu-512mb"
}