"description":"Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)",
"description":"Delete a currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. This is done to avoid deleted accounts being overtaken by new users with the same email address. Any user-related resources like documents or storage files should be deleted separately.",
"description":"Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.\nThis endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.\n",
"description":"User password. Must be at least 8 chars.",
"default":null,
"x-example":"password"
}
},
"required":["email","password"]
}
}
]
}
},
"/account/logs":{
"get":{
"summary":"Get Account Logs",
"operationId":"accountGetLogs",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["account"],
"description":"Get currently logged in user list of latest security activity logs. Each log returns user IP address, location and date and time of log.",
"description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
}
]
}
},
"/account/name":{
"patch":{
"summary":"Update Account Name",
"operationId":"accountUpdateName",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["account"],
"description":"Update currently logged in user account name.",
"description":"User name. Max length: 128 chars.",
"default":null,
"x-example":"[NAME]"
}
},
"required":["name"]
}
}
]
}
},
"/account/password":{
"patch":{
"summary":"Update Account Password",
"operationId":"accountUpdatePassword",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["account"],
"description":"Update currently logged in user password. For validation, user is required to pass in the new password, and the old password. For users created with OAuth and Team Invites, oldPassword is optional.",
"description":"Update currently logged in user account preferences. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.",
"description":"Sends the user an email with a temporary secret key for password reset. When the user clicks the confirmation link he is redirected back to your app password reset URL with the secret key and email address values attached to the URL query string. Use the query string params to submit a request to the [PUT /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to complete the process. The verification link sent to the user's email address is valid for 1 hour.",
"description":"URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.",
"description":"Use this endpoint to complete the user account password reset. Both the **userId** and **secret** arguments will be passed as query parameters to the redirect URL you have provided when sending your request to the [POST /account/recovery](/docs/client/account#accountCreateRecovery) endpoint.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.",
"description":"Use this endpoint to get a logged in user's session using a Session ID. Inputting 'current' will return the current session being used.",
"description":"Session ID. Use the string 'current' to update the current device session.",
"required":true,
"type":"string",
"x-example":"[SESSION_ID]",
"in":"path"
}
]
},
"delete":{
"summary":"Delete Account Session",
"operationId":"accountDeleteSession",
"consumes":["application/json"],
"produces":[],
"tags":["account"],
"description":"Use this endpoint to log out the currently logged in user from all their account sessions across all of their different devices. When using the Session ID argument, only the unique session ID provided is deleted.\n",
"description":"Session ID. Use the string 'current' to delete the current device session.",
"required":true,
"type":"string",
"x-example":"[SESSION_ID]",
"in":"path"
}
]
}
},
"/account/verification":{
"post":{
"summary":"Create Email Verification",
"operationId":"accountCreateVerification",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["account"],
"description":"Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.\n\nPlease note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.\n",
"description":"URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.",
"description":"Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code.",
"description":"You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user /account/sessions endpoint. Use width, height and quality arguments to change the output settings.",
"description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":100,
"in":"query"
},
{
"name":"height",
"description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":100,
"in":"query"
},
{
"name":"quality",
"description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":100,
"in":"query"
}
]
}
},
"/avatars/credit-cards/{code}":{
"get":{
"summary":"Get Credit Card Icon",
"operationId":"avatarsGetCreditCard",
"consumes":["application/json"],
"produces":["image/png"],
"tags":["avatars"],
"description":"The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.",
"description":"Website URL which you want to fetch the favicon from.",
"required":true,
"type":"string",
"format":"url",
"x-example":"https://example.com",
"in":"query"
}
]
}
},
"/avatars/flags/{code}":{
"get":{
"summary":"Get Country Flag",
"operationId":"avatarsGetFlag",
"consumes":["application/json"],
"produces":["image/png"],
"tags":["avatars"],
"description":"You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings.",
"description":"Country Code. ISO Alpha-2 country code format.",
"required":true,
"type":"string",
"x-example":"af",
"in":"path"
},
{
"name":"width",
"description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":100,
"in":"query"
},
{
"name":"height",
"description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":100,
"in":"query"
},
{
"name":"quality",
"description":"Image quality. Pass an integer between 0 to 100. Defaults to 100.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":100,
"in":"query"
}
]
}
},
"/avatars/image":{
"get":{
"summary":"Get Image from URL",
"operationId":"avatarsGetImage",
"consumes":["application/json"],
"produces":["image/*"],
"tags":["avatars"],
"description":"Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.",
"description":"Image URL which you want to crop.",
"required":true,
"type":"string",
"format":"url",
"x-example":"https://example.com",
"in":"query"
},
{
"name":"width",
"description":"Resize preview image width, Pass an integer between 0 to 2000.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":400,
"in":"query"
},
{
"name":"height",
"description":"Resize preview image height, Pass an integer between 0 to 2000.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":400,
"in":"query"
}
]
}
},
"/avatars/initials":{
"get":{
"summary":"Get User Initials",
"operationId":"avatarsGetInitials",
"consumes":["application/json"],
"produces":["image/png"],
"tags":["avatars"],
"description":"Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n\nYou can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.",
"description":"Plain text to be converted to QR code image.",
"required":true,
"type":"string",
"x-example":"[TEXT]",
"in":"query"
},
{
"name":"size",
"description":"QR code size. Pass an integer between 0 to 1000. Defaults to 400.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":400,
"in":"query"
},
{
"name":"margin",
"description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":1,
"in":"query"
},
{
"name":"download",
"description":"Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.",
"required":false,
"type":"boolean",
"x-example":false,
"default":false,
"in":"query"
}
]
}
},
"/database/collections":{
"get":{
"summary":"List Collections",
"operationId":"databaseListCollections",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["database"],
"description":"Get a list of all the user collections. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's collections. [Learn more about different API modes](/docs/admin).",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"limit",
"description":"Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the collection used as the starting point for the query, excluding the collection itself. Should be used for efficient pagination when working with large sets of data.",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderType",
"description":"Order result by ASC or DESC order.",
"description":"Unique Id. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"default":null,
"x-example":"[COLLECTION_ID]"
},
"name":{
"type":"string",
"description":"Collection name. Max length: 128 chars.",
"default":null,
"x-example":"[NAME]"
},
"permission":{
"type":"string",
"description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"document"
},
"read":{
"type":"array",
"description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"write":{
"type":"array",
"description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
}
},
"required":[
"collectionId",
"name",
"permission",
"read",
"write"
]
}
}
]
}
},
"/database/collections/{collectionId}":{
"get":{
"summary":"Get Collection",
"operationId":"databaseGetCollection",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["database"],
"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.",
"description":"Collection name. Max length: 128 chars.",
"default":null,
"x-example":"[NAME]"
},
"permission":{
"type":"string",
"description":"Permissions type model to use for reading documents in this collection. You can use collection-level permission set once on the collection using the `read` and `write` params, or you can set document-level permission where each document read and write params will decide who has access to read and write to each document individually. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"document"
},
"read":{
"type":"array",
"description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"write":{
"type":"array",
"description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"enabled":{
"type":"boolean",
"description":"Is collection enabled?",
"default":true,
"x-example":false
}
},
"required":["name","permission"]
}
}
]
},
"delete":{
"summary":"Delete Collection",
"operationId":"databaseDeleteCollection",
"consumes":["application/json"],
"produces":[],
"tags":["database"],
"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"key":{
"type":"string",
"description":"Attribute Key.",
"default":null,
"x-example":null
},
"required":{
"type":"boolean",
"description":"Is attribute required?",
"default":null,
"x-example":false
},
"default":{
"type":"boolean",
"description":"Default value for attribute when not provided. Cannot be set when attribute is required.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"key":{
"type":"string",
"description":"Attribute Key.",
"default":null,
"x-example":null
},
"required":{
"type":"boolean",
"description":"Is attribute required?",
"default":null,
"x-example":false
},
"default":{
"type":"string",
"description":"Default value for attribute when not provided. Cannot be set when attribute is required.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"key":{
"type":"string",
"description":"Attribute Key.",
"default":null,
"x-example":null
},
"elements":{
"type":"array",
"description":"Array of elements in enumerated type. Uses length of longest element to determine size.",
"default":null,
"x-example":null,
"items":{"type":"string"}
},
"required":{
"type":"boolean",
"description":"Is attribute required?",
"default":null,
"x-example":false
},
"default":{
"type":"string",
"description":"Default value for attribute when not provided. Cannot be set when attribute is required.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"key":{
"type":"string",
"description":"Attribute Key.",
"default":null,
"x-example":null
},
"required":{
"type":"boolean",
"description":"Is attribute required?",
"default":null,
"x-example":false
},
"min":{
"type":"number",
"description":"Minimum value to enforce on new documents",
"default":null,
"x-example":null
},
"max":{
"type":"number",
"description":"Maximum value to enforce on new documents",
"default":null,
"x-example":null
},
"default":{
"type":"number",
"description":"Default value for attribute when not provided. Cannot be set when attribute is required.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"key":{
"type":"string",
"description":"Attribute Key.",
"default":null,
"x-example":null
},
"required":{
"type":"boolean",
"description":"Is attribute required?",
"default":null,
"x-example":false
},
"min":{
"type":"integer",
"description":"Minimum value to enforce on new documents",
"default":null,
"x-example":null
},
"max":{
"type":"integer",
"description":"Maximum value to enforce on new documents",
"default":null,
"x-example":null
},
"default":{
"type":"integer",
"description":"Default value for attribute when not provided. Cannot be set when attribute is required.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"key":{
"type":"string",
"description":"Attribute Key.",
"default":null,
"x-example":null
},
"required":{
"type":"boolean",
"description":"Is attribute required?",
"default":null,
"x-example":false
},
"default":{
"type":"string",
"description":"Default value for attribute when not provided. Cannot be set when attribute is required.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"key":{
"type":"string",
"description":"Attribute Key.",
"default":null,
"x-example":null
},
"size":{
"type":"integer",
"description":"Attribute size for text attributes, in number of characters.",
"default":null,
"x-example":1
},
"required":{
"type":"boolean",
"description":"Is attribute required?",
"default":null,
"x-example":false
},
"default":{
"type":"string",
"description":"Default value for attribute when not provided. Cannot be set when attribute is required.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"key":{
"type":"string",
"description":"Attribute Key.",
"default":null,
"x-example":null
},
"required":{
"type":"boolean",
"description":"Is attribute required?",
"default":null,
"x-example":false
},
"default":{
"type":"string",
"description":"Default value for attribute when not provided. Cannot be set when attribute is required.",
"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"description":"Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. [Learn more about different API modes](/docs/admin).",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"queries",
"description":"Array of query strings.",
"required":false,
"type":"array",
"collectionFormat":"multi",
"items":{"type":"string"},
"default":[],
"in":"query"
},
{
"name":"limit",
"description":"Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the document used as the starting point for the query, excluding the document itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderAttributes",
"description":"Array of attributes used to sort results.",
"required":false,
"type":"array",
"collectionFormat":"multi",
"items":{"type":"string"},
"default":[],
"in":"query"
},
{
"name":"orderTypes",
"description":"Array of order directions for sorting attribtues. Possible values are DESC for descending order, or ASC for ascending order.",
"required":false,
"type":"array",
"collectionFormat":"multi",
"items":{"type":"string"},
"default":[],
"in":"query"
}
]
},
"post":{
"summary":"Create Document",
"operationId":"databaseCreateDocument",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["database"],
"description":"Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](/docs/server/database#databaseCreateCollection) API or directly from your database console.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection). Make sure to define attributes before creating documents.",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"documentId":{
"type":"string",
"description":"Document ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"default":null,
"x-example":"[DOCUMENT_ID]"
},
"data":{
"type":"object",
"description":"Document data as JSON object.",
"default":{},
"x-example":"{}"
},
"read":{
"type":"array",
"description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"write":{
"type":"array",
"description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"documentId",
"description":"Document ID.",
"required":true,
"type":"string",
"x-example":"[DOCUMENT_ID]",
"in":"path"
}
]
},
"patch":{
"summary":"Update Document",
"operationId":"databaseUpdateDocument",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["database"],
"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.",
"description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"write":{
"type":"array",
"description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
}
},
"required":["data"]
}
}
]
},
"delete":{
"summary":"Delete Document",
"operationId":"databaseDeleteDocument",
"consumes":["application/json"],
"produces":[],
"tags":["database"],
"description":"Delete a document by its unique ID. This endpoint deletes only the parent documents, its attributes and relations to other documents. Child documents **will not** be deleted.",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"description":"Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).",
"required":true,
"type":"string",
"x-example":"[COLLECTION_ID]",
"in":"path"
},
{
"name":"key",
"description":"Index Key.",
"required":true,
"type":"string",
"in":"path"
}
]
}
},
"/functions":{
"get":{
"summary":"List Functions",
"operationId":"functionsList",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["functions"],
"description":"Get a list of all the project's functions. You can use the query params to filter your results.",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"limit",
"description":"Maximum number of functions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the function used as the starting point for the query, excluding the function itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderType",
"description":"Order result by ASC or DESC order.",
"required":false,
"type":"string",
"x-example":"ASC",
"default":"ASC",
"in":"query"
}
]
},
"post":{
"summary":"Create Function",
"operationId":"functionsCreate",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["functions"],
"description":"Create a new function. You can pass a list of [permissions](/docs/permissions) to allow different project users or team with access to execute the function using the client API.",
"description":"Function ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"default":null,
"x-example":"[FUNCTION_ID]"
},
"name":{
"type":"string",
"description":"Function name. Max length: 128 chars.",
"default":null,
"x-example":"[NAME]"
},
"execute":{
"type":"array",
"description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":null,
"items":{"type":"string"}
},
"runtime":{
"type":"string",
"description":"Execution runtime.",
"default":null,
"x-example":"node-14.5"
},
"vars":{
"type":"object",
"description":"Key-value JSON object that will be passed to the function as environment variables.",
"default":[],
"x-example":"{}"
},
"events":{
"type":"array",
"description":"Events list.",
"default":[],
"x-example":null,
"items":{"type":"string"}
},
"schedule":{
"type":"string",
"description":"Schedule CRON syntax.",
"default":"",
"x-example":null
},
"timeout":{
"type":"integer",
"description":"Function maximum execution time in seconds.",
"description":"Function name. Max length: 128 chars.",
"default":null,
"x-example":"[NAME]"
},
"execute":{
"type":"array",
"description":"An array of strings with execution permissions. By default no user is granted with any execute permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":null,
"items":{"type":"string"}
},
"vars":{
"type":"object",
"description":"Key-value JSON object that will be passed to the function as environment variables.",
"default":[],
"x-example":"{}"
},
"events":{
"type":"array",
"description":"Events list.",
"default":[],
"x-example":null,
"items":{"type":"string"}
},
"schedule":{
"type":"string",
"description":"Schedule CRON syntax.",
"default":"",
"x-example":null
},
"timeout":{
"type":"integer",
"description":"Maximum execution time in seconds.",
"default":15,
"x-example":1
}
},
"required":["name","execute"]
}
}
]
},
"delete":{
"summary":"Delete Function",
"operationId":"functionsDelete",
"consumes":["application/json"],
"produces":[],
"tags":["functions"],
"description":"Delete a function by its unique ID.",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"limit",
"description":"Maximum number of deployments to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the deployment used as the starting point for the query, excluding the deployment itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderType",
"description":"Order result by ASC or DESC order.",
"required":false,
"type":"string",
"x-example":"ASC",
"default":"ASC",
"in":"query"
}
]
},
"post":{
"summary":"Create Deployment",
"operationId":"functionsCreateDeployment",
"consumes":["multipart/form-data"],
"produces":["application/json"],
"tags":["functions"],
"description":"Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.\n\nThis endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](/docs/functions).\n\nUse the \"command\" param to set the entry point used to execute your code.",
"description":"Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.",
"required":true,
"type":"file",
"in":"formData"
},
{
"name":"activate",
"description":"Automatically activate the deployment when it is finished building.",
"description":"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.",
"description":"Get a list of all the current user function execution logs. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's executions. [Learn more about different API modes](/docs/admin).",
"description":"Maximum number of executions to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"search",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"cursor",
"description":"ID of the execution used as the starting point for the query, excluding the execution itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
}
]
},
"post":{
"summary":"Create Execution",
"operationId":"functionsCreateExecution",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["functions"],
"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.",
"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.",
"description":"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](https://en.wikipedia.org/wiki/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.",
"description":"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.\n\n([IP Geolocation by DB-IP](https://db-ip.com))",
"description":"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.",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"limit",
"description":"Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Results offset. The default value is 0. Use this param to manage pagination.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the bucket used as the starting point for the query, excluding the bucket itself. Should be used for efficient pagination when working with large sets of data.",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderType",
"description":"Order result by ASC or DESC order.",
"description":"Unique Id. Choose your own unique ID or pass the string `unique()` to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"default":null,
"x-example":"[BUCKET_ID]"
},
"name":{
"type":"string",
"description":"Bucket name",
"default":null,
"x-example":"[NAME]"
},
"permission":{
"type":"string",
"description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"file"
},
"read":{
"type":"array",
"description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"write":{
"type":"array",
"description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"enabled":{
"type":"boolean",
"description":"Is bucket enabled?",
"default":true,
"x-example":false
},
"maximumFileSize":{
"type":"integer",
"description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self-hosted setups you can change the max limit by changing the `_APP_STORAGE_LIMIT` environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)",
"default":30000000,
"x-example":null
},
"allowedFileExtensions":{
"type":"array",
"description":"Allowed file extensions",
"default":[],
"x-example":null,
"items":{"type":"string"}
},
"encryption":{
"type":"boolean",
"description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled",
"default":true,
"x-example":false
},
"antivirus":{
"type":"boolean",
"description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled",
"default":true,
"x-example":false
}
},
"required":["bucketId","name","permission"]
}
}
]
}
},
"/storage/buckets/{bucketId}":{
"get":{
"summary":"Get Bucket",
"operationId":"storageGetBucket",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["storage"],
"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.",
"description":"Permissions type model to use for reading files in this bucket. You can use bucket-level permission set once on the bucket using the `read` and `write` params, or you can set file-level permission where each file read and write params will decide who has access to read and write to each file individually. [learn more about permissions](/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"file"
},
"read":{
"type":"array",
"description":"An array of strings with read permissions. By default inherits the existing read permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"write":{
"type":"array",
"description":"An array of strings with write permissions. By default inherits the existing write permissions. [learn more about permissions](/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"enabled":{
"type":"boolean",
"description":"Is bucket enabled?",
"default":true,
"x-example":false
},
"maximumFileSize":{
"type":"integer",
"description":"Maximum file size allowed in bytes. Maximum allowed value is 30MB. For self hosted version you can change the limit by changing _APP_STORAGE_LIMIT environment variable. [Learn more about storage environment variables](docs/environment-variables#storage)",
"default":null,
"x-example":null
},
"allowedFileExtensions":{
"type":"array",
"description":"Allowed file extensions",
"default":[],
"x-example":null,
"items":{"type":"string"}
},
"encryption":{
"type":"boolean",
"description":"Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled",
"default":true,
"x-example":false
},
"antivirus":{
"type":"boolean",
"description":"Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled",
"default":true,
"x-example":false
}
},
"required":["name","permission"]
}
}
]
},
"delete":{
"summary":"Delete Bucket",
"operationId":"storageDeleteBucket",
"consumes":["application/json"],
"produces":[],
"tags":["storage"],
"description":"Delete a storage bucket by its unique ID.",
"description":"Get a list of all the user files. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's files. [Learn more about different API modes](/docs/admin).",
"description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).",
"required":true,
"type":"string",
"x-example":"[BUCKET_ID]",
"in":"path"
},
{
"name":"search",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"limit",
"description":"Maximum number of files to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the file used as the starting point for the query, excluding the file itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderType",
"description":"Order result by ASC or DESC order.",
"required":false,
"type":"string",
"x-example":"ASC",
"default":"ASC",
"in":"query"
}
]
},
"post":{
"summary":"Create File",
"operationId":"storageCreateFile",
"consumes":["multipart/form-data"],
"produces":["application/json"],
"tags":["storage"],
"description":"Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](/docs/server/database#storageCreateBucket) API or directly from your Appwrite console.\n\nLarger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n\nWhen the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n\nIf you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n",
"description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).",
"required":true,
"type":"string",
"x-example":"[BUCKET_ID]",
"in":"path"
},
{
"name":"fileId",
"description":"File ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"required":true,
"x-upload-id":true,
"type":"string",
"x-example":"[FILE_ID]",
"in":"formData"
},
{
"name":"file",
"description":"Binary file.",
"required":true,
"type":"file",
"in":"formData"
},
{
"name":"read",
"description":"An array of strings with read permissions. By default only the current user is granted with read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"required":false,
"type":"array",
"collectionFormat":"multi",
"items":{"type":"string"},
"x-example":"[\"role:all\"]",
"in":"formData"
},
{
"name":"write",
"description":"An array of strings with write permissions. By default only the current user is granted with write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"required":false,
"type":"array",
"collectionFormat":"multi",
"items":{"type":"string"},
"x-example":"[\"role:all\"]",
"in":"formData"
}
]
}
},
"/storage/buckets/{bucketId}/files/{fileId}":{
"get":{
"summary":"Get File",
"operationId":"storageGetFile",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["storage"],
"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.",
"description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).",
"required":true,
"type":"string",
"x-example":"[BUCKET_ID]",
"in":"path"
},
{
"name":"fileId",
"description":"File ID.",
"required":true,
"type":"string",
"x-example":"[FILE_ID]",
"in":"path"
}
]
},
"put":{
"summary":"Update File",
"operationId":"storageUpdateFile",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["storage"],
"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.",
"description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).",
"required":true,
"type":"string",
"x-example":"[BUCKET_ID]",
"in":"path"
},
{
"name":"fileId",
"description":"File unique ID.",
"required":true,
"type":"string",
"x-example":"[FILE_ID]",
"in":"path"
},
{
"name":"payload",
"in":"body",
"schema":{
"type":"object",
"properties":{
"read":{
"type":"array",
"description":"An array of strings with read permissions. By default no user is granted with any read permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
},
"write":{
"type":"array",
"description":"An array of strings with write permissions. By default no user is granted with any write permissions. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.",
"default":null,
"x-example":"[\"role:all\"]",
"items":{"type":"string"}
}
}
}
}
]
},
"delete":{
"summary":"Delete File",
"operationId":"storageDeleteFile",
"consumes":["application/json"],
"produces":[],
"tags":["storage"],
"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.",
"description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).",
"description":"Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.",
"description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).",
"description":"Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.",
"description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).",
"required":true,
"type":"string",
"x-example":"[BUCKET_ID]",
"in":"path"
},
{
"name":"fileId",
"description":"File ID",
"required":true,
"type":"string",
"x-example":"[FILE_ID]",
"in":"path"
},
{
"name":"width",
"description":"Resize preview image width, Pass an integer between 0 to 4000.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"height",
"description":"Resize preview image height, Pass an integer between 0 to 4000.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"gravity",
"description":"Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right",
"required":false,
"type":"string",
"x-example":"center",
"default":"center",
"in":"query"
},
{
"name":"quality",
"description":"Preview image quality. Pass an integer between 0 to 100. Defaults to 100.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":100,
"in":"query"
},
{
"name":"borderWidth",
"description":"Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"borderColor",
"description":"Preview image border color. Use a valid HEX color, no # is needed for prefix.",
"required":false,
"type":"string",
"default":"",
"in":"query"
},
{
"name":"borderRadius",
"description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"opacity",
"description":"Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.",
"required":false,
"type":"number",
"format":"float",
"x-example":0,
"default":1,
"in":"query"
},
{
"name":"rotation",
"description":"Preview image rotation in degrees. Pass an integer between -360 and 360.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":-360,
"default":0,
"in":"query"
},
{
"name":"background",
"description":"Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.",
"required":false,
"type":"string",
"default":"",
"in":"query"
},
{
"name":"output",
"description":"Output format type (jpeg, jpg, png, gif and webp).",
"description":"Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.",
"description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](/docs/server/storage#createBucket).",
"required":true,
"type":"string",
"x-example":"[BUCKET_ID]",
"in":"path"
},
{
"name":"fileId",
"description":"File ID.",
"required":true,
"type":"string",
"x-example":"[FILE_ID]",
"in":"path"
}
]
}
},
"/teams":{
"get":{
"summary":"List Teams",
"operationId":"teamsList",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["teams"],
"description":"Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.\r\n\r\nIn admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin).",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"limit",
"description":"Maximum number of teams to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the team used as the starting point for the query, excluding the team itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderType",
"description":"Order result by ASC or DESC order.",
"required":false,
"type":"string",
"x-example":"ASC",
"default":"ASC",
"in":"query"
}
]
},
"post":{
"summary":"Create Team",
"operationId":"teamsCreate",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["teams"],
"description":"Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.",
"description":"Team ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"default":null,
"x-example":"[TEAM_ID]"
},
"name":{
"type":"string",
"description":"Team name. Max length: 128 chars.",
"default":null,
"x-example":"[NAME]"
},
"roles":{
"type":"array",
"description":"Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.",
"default":["owner"],
"x-example":null,
"items":{"type":"string"}
}
},
"required":["teamId","name"]
}
}
]
}
},
"/teams/{teamId}":{
"get":{
"summary":"Get Team",
"operationId":"teamsGet",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["teams"],
"description":"Get a team by its ID. All team members have read access for this resource.",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"limit",
"description":"Maximum number of memberships to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the membership used as the starting point for the query, excluding the membership itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderType",
"description":"Order result by ASC or DESC order.",
"required":false,
"type":"string",
"x-example":"ASC",
"default":"ASC",
"in":"query"
}
]
},
"post":{
"summary":"Create Team Membership",
"operationId":"teamsCreateMembership",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["teams"],
"description":"Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team.\n\nUse the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. \n\nPlease note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface.",
"description":"Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.",
"default":null,
"x-example":null,
"items":{"type":"string"}
},
"url":{
"type":"string",
"description":"URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.",
"default":null,
"x-example":"https://example.com"
},
"name":{
"type":"string",
"description":"Name of the new team member. Max length: 128 chars.",
"default":"",
"x-example":"[NAME]"
}
},
"required":["email","roles","url"]
}
}
]
}
},
"/teams/{teamId}/memberships/{membershipId}":{
"get":{
"summary":"Get Team Membership",
"operationId":"teamsGetMembership",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["teams"],
"description":"Get a team member by the membership unique id. All team members have read access for this resource.",
"description":"Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions).",
"description":"An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Max length for each role is 32 chars.",
"default":null,
"x-example":null,
"items":{"type":"string"}
}
},
"required":["roles"]
}
}
]
},
"delete":{
"summary":"Delete Team Membership",
"operationId":"teamsDeleteMembership",
"consumes":["application/json"],
"produces":[],
"tags":["teams"],
"description":"This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.",
"description":"Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user.\n\nIf the request is successful, a session for the user is automatically created.\n",
"description":"Search term to filter your list results. Max length: 256 chars.",
"required":false,
"type":"string",
"x-example":"[SEARCH]",
"default":"",
"in":"query"
},
{
"name":"limit",
"description":"Maximum number of users to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
},
{
"name":"cursor",
"description":"ID of the user used as the starting point for the query, excluding the user itself. Should be used for efficient pagination when working with large sets of data. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"string",
"x-example":"[CURSOR]",
"default":"",
"in":"query"
},
{
"name":"cursorDirection",
"description":"Direction of the cursor.",
"required":false,
"type":"string",
"x-example":"after",
"default":"after",
"in":"query"
},
{
"name":"orderType",
"description":"Order result by ASC or DESC order.",
"description":"User ID. Choose your own unique ID or pass the string \"unique()\" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.",
"default":null,
"x-example":"[USER_ID]"
},
"email":{
"type":"string",
"description":"User email.",
"default":null,
"x-example":"email@example.com"
},
"password":{
"type":"string",
"description":"User password. Must be at least 8 chars.",
"default":null,
"x-example":"password"
},
"name":{
"type":"string",
"description":"User name. Max length: 128 chars.",
"description":"Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":25,
"in":"query"
},
{
"name":"offset",
"description":"Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)",
"required":false,
"type":"integer",
"format":"int32",
"x-example":0,
"default":0,
"in":"query"
}
]
}
},
"/users/{userId}/name":{
"patch":{
"summary":"Update Name",
"operationId":"usersUpdateName",
"consumes":["application/json"],
"produces":["application/json"],
"tags":["users"],
"description":"Update the user name by its unique ID.",
"description":"Update the user preferences by its unique ID. The object you pass is stored as is, and replaces any previous value. The maximum allowed prefs size is 64kB and throws error if exceeded.",
"description":"The Account service allows you to authenticate and manage a user account."
},
{
"name":"avatars",
"description":"The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars."
},
{
"name":"database",
"description":"The Database service allows you to create structured collections of documents, query and filter lists of documents"
},
{
"name":"locale",
"description":"The Locale service allows you to customize your app based on your users' location."
},
{
"name":"health",
"description":"The Health service allows you to both validate and monitor your Appwrite server's health."
},
{
"name":"projects",
"description":"The Project service allows you to manage all the projects in your Appwrite server."
},
{
"name":"storage",
"description":"The Storage service allows you to manage your project files."
},
{
"name":"teams",
"description":"The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources"
},
{
"name":"users",
"description":"The Users service allows you to manage your project users."
},
{
"name":"functions",
"description":"The Functions Service allows you view, create and manage your Cloud Functions."
}
],
"definitions":{
"documentList":{
"description":"Documents List",
"type":"object",
"properties":{
"total":{
"type":"integer",
"description":"Total number of documents documents that matched your query.",
"description":"Session expiration date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"provider":{
"type":"string",
"description":"Session Provider.",
"x-example":"email"
},
"providerUid":{
"type":"string",
"description":"Session Provider User ID.",
"x-example":"user@example.com"
},
"providerAccessToken":{
"type":"string",
"description":"Session Provider Access Token.",
"x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
},
"providerAccessTokenExpiry":{
"type":"integer",
"description":"Date, the Unix timestamp of when the access token expires.",
"x-example":1592981250,
"format":"int32"
},
"providerRefreshToken":{
"type":"string",
"description":"Session Provider Refresh Token.",
"x-example":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3"
},
"ip":{
"type":"string",
"description":"IP in use when the session was created.",
"x-example":"127.0.0.1"
},
"osCode":{
"type":"string",
"description":"Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).",
"x-example":"Mac"
},
"osName":{
"type":"string",
"description":"Operating system name.",
"x-example":"Mac"
},
"osVersion":{
"type":"string",
"description":"Operating system version.",
"x-example":"Mac"
},
"clientType":{
"type":"string",
"description":"Client type.",
"x-example":"browser"
},
"clientCode":{
"type":"string",
"description":"Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).",
"x-example":"CM"
},
"clientName":{
"type":"string",
"description":"Client name.",
"x-example":"Chrome Mobile iOS"
},
"clientVersion":{
"type":"string",
"description":"Client version.",
"x-example":"84.0"
},
"clientEngine":{
"type":"string",
"description":"Client engine name.",
"x-example":"WebKit"
},
"clientEngineVersion":{
"type":"string",
"description":"Client engine name.",
"x-example":"605.1.15"
},
"deviceName":{
"type":"string",
"description":"Device name.",
"x-example":"smartphone"
},
"deviceBrand":{
"type":"string",
"description":"Device brand name.",
"x-example":"Google"
},
"deviceModel":{
"type":"string",
"description":"Device model name.",
"x-example":"Nexus 5"
},
"countryCode":{
"type":"string",
"description":"Country two-character ISO 3166-1 alpha code.",
"x-example":"US"
},
"countryName":{
"type":"string",
"description":"Country name.",
"x-example":"United States"
},
"current":{
"type":"boolean",
"description":"Returns true if this the current user session.",
"x-example":true
}
},
"required":[
"$id",
"userId",
"expire",
"provider",
"providerUid",
"providerAccessToken",
"providerAccessTokenExpiry",
"providerRefreshToken",
"ip",
"osCode",
"osName",
"osVersion",
"clientType",
"clientCode",
"clientName",
"clientVersion",
"clientEngine",
"clientEngineVersion",
"deviceName",
"deviceBrand",
"deviceModel",
"countryCode",
"countryName",
"current"
]
},
"token":{
"description":"Token",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"Token ID.",
"x-example":"bb8ea5c16897e"
},
"userId":{
"type":"string",
"description":"User ID.",
"x-example":"5e5ea5c168bb8"
},
"secret":{
"type":"string",
"description":"Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.",
"x-example":""
},
"expire":{
"type":"integer",
"description":"Token expiration date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
}
},
"required":["$id","userId","secret","expire"]
},
"locale":{
"description":"Locale",
"type":"object",
"properties":{
"ip":{
"type":"string",
"description":"User IP address.",
"x-example":"127.0.0.1"
},
"countryCode":{
"type":"string",
"description":"Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format",
"x-example":"US"
},
"country":{
"type":"string",
"description":"Country name. This field support localization.",
"x-example":"United States"
},
"continentCode":{
"type":"string",
"description":"Continent code. A two character continent code \"AF\" for Africa, \"AN\" for Antarctica, \"AS\" for Asia, \"EU\" for Europe, \"NA\" for North America, \"OC\" for Oceania, and \"SA\" for South America.",
"x-example":"NA"
},
"continent":{
"type":"string",
"description":"Continent name. This field support localization.",
"x-example":"North America"
},
"eu":{
"type":"boolean",
"description":"True if country is part of the Europian Union.",
"x-example":false
},
"currency":{
"type":"string",
"description":"Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format",
"x-example":"USD"
}
},
"required":[
"ip",
"countryCode",
"country",
"continentCode",
"continent",
"eu",
"currency"
]
},
"file":{
"description":"File",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"File ID.",
"x-example":"5e5ea5c16897e"
},
"bucketId":{
"type":"string",
"description":"Bucket ID.",
"x-example":"5e5ea5c16897e"
},
"$read":{
"type":"array",
"description":"File read permissions.",
"items":{"type":"string"},
"x-example":"role:all"
},
"$write":{
"type":"array",
"description":"File write permissions.",
"items":{"type":"string"},
"x-example":"user:608f9da25e7e1"
},
"name":{
"type":"string",
"description":"File name.",
"x-example":"Pink.png"
},
"dateCreated":{
"type":"integer",
"description":"File creation date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"signature":{
"type":"string",
"description":"File MD5 signature.",
"x-example":"5d529fd02b544198ae075bd57c1762bb"
},
"mimeType":{
"type":"string",
"description":"File mime type.",
"x-example":"image/png"
},
"sizeOriginal":{
"type":"integer",
"description":"File original size in bytes.",
"x-example":17890,
"format":"int32"
},
"chunksTotal":{
"type":"integer",
"description":"Total number of chunks available",
"x-example":17890,
"format":"int32"
},
"chunksUploaded":{
"type":"integer",
"description":"Total number of chunks uploaded",
"x-example":17890,
"format":"int32"
}
},
"required":[
"$id",
"bucketId",
"$read",
"$write",
"name",
"dateCreated",
"signature",
"mimeType",
"sizeOriginal",
"chunksTotal",
"chunksUploaded"
]
},
"bucket":{
"description":"Bucket",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"Bucket ID.",
"x-example":"5e5ea5c16897e"
},
"$read":{
"type":"array",
"description":"File read permissions.",
"items":{"type":"string"},
"x-example":["role:all"]
},
"$write":{
"type":"array",
"description":"File write permissions.",
"items":{"type":"string"},
"x-example":["user:608f9da25e7e1"]
},
"permission":{
"type":"string",
"description":"Bucket permission model. Possible values: `bucket` or `file`",
"x-example":"file"
},
"dateCreated":{
"type":"integer",
"description":"Bucket creation date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"dateUpdated":{
"type":"integer",
"description":"Bucket update date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"name":{
"type":"string",
"description":"Bucket name.",
"x-example":"Documents"
},
"enabled":{
"type":"boolean",
"description":"Bucket enabled.",
"x-example":false
},
"maximumFileSize":{
"type":"integer",
"description":"Maximum file size supported.",
"x-example":100,
"format":"int32"
},
"allowedFileExtensions":{
"type":"array",
"description":"Allowed file extensions.",
"items":{"type":"string"},
"x-example":["jpg","png"]
},
"encryption":{
"type":"boolean",
"description":"Bucket is encrypted.",
"x-example":false
},
"antivirus":{
"type":"boolean",
"description":"Virus scanning is enabled.",
"x-example":false
}
},
"required":[
"$id",
"$read",
"$write",
"permission",
"dateCreated",
"dateUpdated",
"name",
"enabled",
"maximumFileSize",
"allowedFileExtensions",
"encryption",
"antivirus"
]
},
"team":{
"description":"Team",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"Team ID.",
"x-example":"5e5ea5c16897e"
},
"name":{
"type":"string",
"description":"Team name.",
"x-example":"VIP"
},
"dateCreated":{
"type":"integer",
"description":"Team creation date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"total":{
"type":"integer",
"description":"Total number of team members.",
"x-example":7,
"format":"int32"
}
},
"required":["$id","name","dateCreated","total"]
},
"membership":{
"description":"Membership",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"Membership ID.",
"x-example":"5e5ea5c16897e"
},
"userId":{
"type":"string",
"description":"User ID.",
"x-example":"5e5ea5c16897e"
},
"teamId":{
"type":"string",
"description":"Team ID.",
"x-example":"5e5ea5c16897e"
},
"name":{
"type":"string",
"description":"User name.",
"x-example":"VIP"
},
"email":{
"type":"string",
"description":"User email address.",
"x-example":"john@appwrite.io"
},
"invited":{
"type":"integer",
"description":"Date, the user has been invited to join the team in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"joined":{
"type":"integer",
"description":"Date, the user has accepted the invitation to join the team in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"confirm":{
"type":"boolean",
"description":"User confirmation status, true if the user has joined the team or false otherwise.",
"x-example":false
},
"roles":{
"type":"array",
"description":"User list of roles",
"items":{"type":"string"},
"x-example":"admin"
}
},
"required":[
"$id",
"userId",
"teamId",
"name",
"email",
"invited",
"joined",
"confirm",
"roles"
]
},
"function":{
"description":"Function",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"Function ID.",
"x-example":"5e5ea5c16897e"
},
"execute":{
"type":"array",
"description":"Execution permissions.",
"items":{"type":"string"},
"x-example":"role:member"
},
"name":{
"type":"string",
"description":"Function name.",
"x-example":"My Function"
},
"dateCreated":{
"type":"integer",
"description":"Function creation date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"dateUpdated":{
"type":"integer",
"description":"Function update date in Unix timestamp.",
"x-example":1592981257,
"format":"int32"
},
"status":{
"type":"string",
"description":"Function status. Possible values: `disabled`, `enabled`",
"x-example":"enabled"
},
"runtime":{
"type":"string",
"description":"Function execution runtime.",
"x-example":"python-3.8"
},
"deployment":{
"type":"string",
"description":"Function's active deployment ID.",
"x-example":"5e5ea5c16897e"
},
"vars":{
"type":"object",
"additionalProperties":true,
"description":"Function environment variables.",
"x-example":{"key":"value"}
},
"events":{
"type":"array",
"description":"Function trigger events.",
"items":{"type":"string"},
"x-example":"account.create"
},
"schedule":{
"type":"string",
"description":"Function execution schedult in CRON format.",
"x-example":"5 4 * * *"
},
"scheduleNext":{
"type":"integer",
"description":"Function next scheduled execution date in Unix timestamp.",
"x-example":1592981292,
"format":"int32"
},
"schedulePrevious":{
"type":"integer",
"description":"Function next scheduled execution date in Unix timestamp.",
"x-example":1592981237,
"format":"int32"
},
"timeout":{
"type":"integer",
"description":"Function execution timeout in seconds.",
"x-example":1592981237,
"format":"int32"
}
},
"required":[
"$id",
"execute",
"name",
"dateCreated",
"dateUpdated",
"status",
"runtime",
"deployment",
"vars",
"events",
"schedule",
"scheduleNext",
"schedulePrevious",
"timeout"
]
},
"runtime":{
"description":"Runtime",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"Runtime ID.",
"x-example":"python-3.8"
},
"name":{
"type":"string",
"description":"Runtime Name.",
"x-example":"Python"
},
"version":{
"type":"string",
"description":"Runtime version.",
"x-example":"3.8"
},
"base":{
"type":"string",
"description":"Base Docker image used to build the runtime.",
"x-example":"python:3.8-alpine"
},
"image":{
"type":"string",
"description":"Image name of Docker Hub.",
"x-example":"appwrite\\/runtime-for-python:3.8"
},
"logo":{
"type":"string",
"description":"Name of the logo image.",
"x-example":"python.png"
},
"supports":{
"type":"array",
"description":"List of supported architectures.",
"items":{"type":"string"},
"x-example":"amd64"
}
},
"required":[
"$id",
"name",
"version",
"base",
"image",
"logo",
"supports"
]
},
"deployment":{
"description":"Deployment",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"Deployment ID.",
"x-example":"5e5ea5c16897e"
},
"resourceId":{
"type":"string",
"description":"Resource ID.",
"x-example":"5e5ea6g16897e"
},
"resourceType":{
"type":"string",
"description":"Resource type.",
"x-example":"functions"
},
"dateCreated":{
"type":"integer",
"description":"The deployment creation date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"entrypoint":{
"type":"string",
"description":"The entrypoint file to use to execute the deployment code.",
"x-example":"enabled"
},
"size":{
"type":"integer",
"description":"The code size in bytes.",
"x-example":128,
"format":"int32"
},
"buildId":{
"type":"string",
"description":"The current build ID.",
"x-example":"5e5ea5c16897e"
},
"activate":{
"type":"boolean",
"description":"Whether the deployment should be automatically activated.",
"x-example":true
},
"status":{
"type":"string",
"description":"The deployment status.",
"x-example":"enabled"
},
"buildStdout":{
"type":"string",
"description":"The build stdout.",
"x-example":"enabled"
},
"buildStderr":{
"type":"string",
"description":"The build stderr.",
"x-example":"enabled"
}
},
"required":[
"$id",
"resourceId",
"resourceType",
"dateCreated",
"entrypoint",
"size",
"buildId",
"activate",
"status",
"buildStdout",
"buildStderr"
]
},
"execution":{
"description":"Execution",
"type":"object",
"properties":{
"$id":{
"type":"string",
"description":"Execution ID.",
"x-example":"5e5ea5c16897e"
},
"$read":{
"type":"array",
"description":"Execution read permissions.",
"items":{"type":"string"},
"x-example":"role:all"
},
"functionId":{
"type":"string",
"description":"Function ID.",
"x-example":"5e5ea6g16897e"
},
"dateCreated":{
"type":"integer",
"description":"The execution creation date in Unix timestamp.",
"x-example":1592981250,
"format":"int32"
},
"trigger":{
"type":"string",
"description":"The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.",
"x-example":"http"
},
"status":{
"type":"string",
"description":"The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.",
"x-example":"processing"
},
"statusCode":{
"type":"integer",
"description":"The script status code.",
"x-example":0,
"format":"int32"
},
"stdout":{
"type":"string",
"description":"The script stdout output string. Logs the last 4,000 characters of the execution stdout output.",
"x-example":""
},
"stderr":{
"type":"string",
"description":"The script stderr output string. Logs the last 4,000 characters of the execution stderr output",
"x-example":""
},
"time":{
"type":"number",
"description":"The script execution time in seconds.",
"x-example":0.4,
"format":"double"
}
},
"required":[
"$id",
"$read",
"functionId",
"dateCreated",
"trigger",
"status",
"statusCode",
"stdout",
"stderr",
"time"
]
},
"country":{
"description":"Country",
"type":"object",
"properties":{
"name":{
"type":"string",
"description":"Country name.",
"x-example":"United States"
},
"code":{
"type":"string",
"description":"Country two-character ISO 3166-1 alpha code.",
"x-example":"US"
}
},
"required":["name","code"]
},
"continent":{
"description":"Continent",
"type":"object",
"properties":{
"name":{
"type":"string",
"description":"Continent name.",
"x-example":"Europe"
},
"code":{
"type":"string",
"description":"Continent two letter code.",
"x-example":"EU"
}
},
"required":["name","code"]
},
"language":{
"description":"Language",
"type":"object",
"properties":{
"name":{
"type":"string",
"description":"Language name.",
"x-example":"Italian"
},
"code":{
"type":"string",
"description":"Language two-character ISO 639-1 codes.",
"x-example":"it"
},
"nativeName":{
"type":"string",
"description":"Language native name.",
"x-example":"Italiano"
}
},
"required":["name","code","nativeName"]
},
"currency":{
"description":"Currency",
"type":"object",
"properties":{
"symbol":{
"type":"string",
"description":"Currency symbol.",
"x-example":"$"
},
"name":{
"type":"string",
"description":"Currency name.",
"x-example":"US dollar"
},
"symbolNative":{
"type":"string",
"description":"Currency native symbol.",
"x-example":"$"
},
"decimalDigits":{
"type":"integer",
"description":"Number of decimal digits.",
"x-example":2,
"format":"int32"
},
"rounding":{
"type":"number",
"description":"Currency digit rounding.",
"x-example":0,
"format":"double"
},
"code":{
"type":"string",
"description":"Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.",
"x-example":"USD"
},
"namePlural":{
"type":"string",
"description":"Currency plural name",
"x-example":"US dollars"
}
},
"required":[
"symbol",
"name",
"symbolNative",
"decimalDigits",
"rounding",
"code",
"namePlural"
]
},
"phone":{
"description":"Phone",
"type":"object",
"properties":{
"code":{
"type":"string",
"description":"Phone code.",
"x-example":"+1"
},
"countryCode":{
"type":"string",
"description":"Country two-character ISO 3166-1 alpha code.",
"x-example":"US"
},
"countryName":{
"type":"string",
"description":"Country name.",
"x-example":"United States"
}
},
"required":["code","countryCode","countryName"]
},
"healthAntivirus":{
"description":"Health Antivirus",
"type":"object",
"properties":{
"version":{
"type":"string",
"description":"Antivirus version.",
"x-example":"1.0.0"
},
"status":{
"type":"string",
"description":"Antivirus status. Possible values can are: `disabled`, `offline`, `online`",
"x-example":"online"
}
},
"required":["version","status"]
},
"healthQueue":{
"description":"Health Queue",
"type":"object",
"properties":{
"size":{
"type":"integer",
"description":"Amount of actions in the queue.",
"x-example":8,
"format":"int32"
}
},
"required":["size"]
},
"healthStatus":{
"description":"Health Status",
"type":"object",
"properties":{
"ping":{
"type":"integer",
"description":"Duration in milliseconds how long the health check took.",
"x-example":128,
"format":"int32"
},
"status":{
"type":"string",
"description":"Service status. Possible values can are: `pass`, `fail`",
"x-example":"pass"
}
},
"required":["ping","status"]
},
"healthTime":{
"description":"Health Time",
"type":"object",
"properties":{
"remoteTime":{
"type":"integer",
"description":"Current unix timestamp on trustful remote server.",
"x-example":1639490751,
"format":"int32"
},
"localTime":{
"type":"integer",
"description":"Current unix timestamp of local server where Appwrite runs.",
"x-example":1639490844,
"format":"int32"
},
"diff":{
"type":"integer",
"description":"Difference of unix remote and local timestamps in milliseconds.",
"x-example":93,
"format":"int32"
}
},
"required":["remoteTime","localTime","diff"]
}
},
"externalDocs":{
"description":"Full API docs, specs and tutorials",