From 8f14f5aa21d5efbab61781f9a53555b019953a51 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 22 Jun 2022 16:36:49 +0545 Subject: [PATCH] Database layer (#3338) * database response model * database collection config * new database scopes * database service update * database execption codes * remove read write permission from database model * updating tests and fixing some bugs * server side tests are now passing * databases api * tests for database endpoint * composer update * fix error * formatting * formatting fixes * get database test * more updates to events and usage * more usage updates * fix delete type * fix test * delete database * more fixes * databaseId in attributes and indexes * more fixes * fix issues * fix index subquery * fix console scope and index query * updating tests as required * fix phpcs errors and warnings * updates to review suggestions * UI progress * ui updates and cleaning up * fix type * rework database events * update tests * update types * event generation fixed * events config updated * updating context to support multiple * realtime updates * fix ids * update context * validator updates * fix naming conflict * fix tests * fix lint errors * fix wprler and realtime tests * fix webhooks test * fix event validator and other tests * formatting fixes * removing leftover var_dumps * remove leftover comment * update usage params * usage metrics updates * update database usage * fix usage * specs update * updates to usage * fix UI and usage * fix lints * internal id fixes * fixes for internal Id * renaming services and related files * rename tests * rename doc link * rename readme * fix test name * tests: fixes for 0.15.x sync Co-authored-by: Torsten Dittmann --- Dockerfile | 2 +- README-CN.md | 2 +- README.md | 2 +- app/config/collections.php | 126 +- app/config/events.php | 82 +- app/config/roles.php | 2 + app/config/scopes.php | 6 + app/config/services.php | 16 +- app/config/specs/open-api3-0.15.x-client.json | 2 +- .../specs/open-api3-0.15.x-console.json | 2 +- app/config/specs/open-api3-0.15.x-server.json | 2 +- app/config/specs/open-api3-latest-client.json | 2 +- .../specs/open-api3-latest-console.json | 2 +- app/config/specs/open-api3-latest-server.json | 2 +- app/config/specs/swagger2-0.15.x-client.json | 2 +- app/config/specs/swagger2-0.15.x-console.json | 2 +- app/config/specs/swagger2-0.15.x-server.json | 2 +- app/config/specs/swagger2-latest-client.json | 2 +- app/config/specs/swagger2-latest-console.json | 2 +- app/config/specs/swagger2-latest-server.json | 2 +- .../api/{database.php => databases.php} | 1582 ++++++++++++----- app/controllers/api/functions.php | 2 +- app/controllers/api/storage.php | 6 +- app/controllers/shared/api.php | 12 +- app/controllers/web/console.php | 65 +- app/init.php | 9 +- app/views/console/comps/header.phtml | 2 +- app/views/console/database/rules/array.phtml | 57 - .../console/database/rules/boolean.phtml | 7 - .../console/database/rules/document.phtml | 19 - .../console/database/rules/documentId.phtml | 57 - app/views/console/database/rules/email.phtml | 6 - app/views/console/database/rules/fileId.phtml | 20 - app/views/console/database/rules/ip.phtml | 6 - .../console/database/rules/markdown.phtml | 7 - .../console/database/rules/numeric.phtml | 7 - app/views/console/database/rules/text.phtml | 6 - app/views/console/database/rules/url.phtml | 6 - .../console/database/rules/wildcard.phtml | 6 - .../console/database/search/documents.phtml | 148 -- app/views/console/database/search/files.phtml | 131 -- .../{database => databases}/collection.phtml | 135 +- app/views/console/databases/database.phtml | 326 ++++ .../{database => databases}/document.phtml | 31 +- .../{database => databases}/form.phtml | 0 .../{database => databases}/index.phtml | 106 +- app/views/install/compose.phtml | 6 +- app/workers/{database.php => databases.php} | 49 +- app/workers/deletes.php | 25 +- bin/{worker-database => worker-databases} | 2 +- docker-compose.yml | 6 +- phpunit.xml | 2 +- public/dist/scripts/app-all.js | 146 +- public/dist/scripts/app-dep.js | 140 +- public/dist/scripts/app.js | 6 +- .../services/{database.png => databases.png} | Bin public/scripts/dependencies/appwrite.js | 463 ++++- public/scripts/filters.js | 4 +- public/scripts/routes.js | 28 +- src/Appwrite/Event/Database.php | 14 + src/Appwrite/Event/Event.php | 75 +- src/Appwrite/Event/Validator/Event.php | 21 +- src/Appwrite/Extend/Exception.php | 4 + src/Appwrite/Messaging/Adapter/Realtime.php | 15 +- src/Appwrite/Stats/Stats.php | 22 +- src/Appwrite/Stats/Usage.php | 129 +- src/Appwrite/Stats/UsageDB.php | 25 +- src/Appwrite/Utopia/Response.php | 9 +- .../Utopia/Response/Model/Collection.php | 6 + .../Utopia/Response/Model/Database.php | 47 + .../Utopia/Response/Model/UsageDatabases.php | 146 ++ tests/e2e/Scopes/ProjectCustom.php | 4 +- .../DatabasesBase.php} | 335 ++-- .../DatabasesConsoleClientTest.php} | 110 +- .../DatabasesCustomClientTest.php} | 33 +- .../DatabasesCustomServerTest.php} | 402 ++++- .../DatabasesPermissionsGuestTest.php} | 33 +- .../DatabasesPermissionsMemberTest.php} | 34 +- .../DatabasesPermissionsScope.php} | 4 +- .../DatabasesPermissionsTeamTest.php} | 29 +- .../Realtime/RealtimeConsoleClientTest.php | 104 +- .../Realtime/RealtimeCustomClientTest.php | 208 ++- tests/e2e/Services/Webhooks/WebhooksBase.php | 130 +- .../Webhooks/WebhooksCustomServerTest.php | 66 +- tests/unit/Event/EventTest.php | 31 + .../Event/Validator/EventValidatorTest.php | 30 +- tests/unit/Messaging/MessagingTest.php | 10 +- tests/unit/Migration/MigrationV13Test.php | 19 +- 88 files changed, 4023 insertions(+), 1970 deletions(-) rename app/controllers/api/{database.php => databases.php} (55%) delete mode 100644 app/views/console/database/rules/array.phtml delete mode 100644 app/views/console/database/rules/boolean.phtml delete mode 100644 app/views/console/database/rules/document.phtml delete mode 100644 app/views/console/database/rules/documentId.phtml delete mode 100644 app/views/console/database/rules/email.phtml delete mode 100644 app/views/console/database/rules/fileId.phtml delete mode 100644 app/views/console/database/rules/ip.phtml delete mode 100644 app/views/console/database/rules/markdown.phtml delete mode 100644 app/views/console/database/rules/numeric.phtml delete mode 100644 app/views/console/database/rules/text.phtml delete mode 100644 app/views/console/database/rules/url.phtml delete mode 100644 app/views/console/database/rules/wildcard.phtml delete mode 100644 app/views/console/database/search/documents.phtml delete mode 100644 app/views/console/database/search/files.phtml rename app/views/console/{database => databases}/collection.phtml (90%) create mode 100644 app/views/console/databases/database.phtml rename app/views/console/{database => databases}/document.phtml (95%) rename app/views/console/{database => databases}/form.phtml (100%) rename app/views/console/{database => databases}/index.phtml (69%) rename app/workers/{database.php => databases.php} (81%) rename bin/{worker-database => worker-databases} (71%) rename public/images/services/{database.png => databases.png} (100%) create mode 100644 src/Appwrite/Utopia/Response/Model/Database.php create mode 100644 src/Appwrite/Utopia/Response/Model/UsageDatabases.php rename tests/e2e/Services/{Database/DatabaseBase.php => Databases/DatabasesBase.php} (86%) rename tests/e2e/Services/{Database/DatabaseConsoleClientTest.php => Databases/DatabasesConsoleClientTest.php} (57%) rename tests/e2e/Services/{Database/DatabaseCustomClientTest.php => Databases/DatabasesCustomClientTest.php} (76%) rename tests/e2e/Services/{Database/DatabaseCustomServerTest.php => Databases/DatabasesCustomServerTest.php} (66%) rename tests/e2e/Services/{Database/DatabasePermissionsGuestTest.php => Databases/DatabasesPermissionsGuestTest.php} (57%) rename tests/e2e/Services/{Database/DatabasePermissionsMemberTest.php => Databases/DatabasesPermissionsMemberTest.php} (78%) rename tests/e2e/Services/{Database/DatabasePermissionsScope.php => Databases/DatabasesPermissionsScope.php} (97%) rename tests/e2e/Services/{Database/DatabasePermissionsTeamTest.php => Databases/DatabasesPermissionsTeamTest.php} (79%) diff --git a/Dockerfile b/Dockerfile index 5f9d007ec..3b6524d15 100755 --- a/Dockerfile +++ b/Dockerfile @@ -302,7 +302,7 @@ RUN chmod +x /usr/local/bin/doctor && \ chmod +x /usr/local/bin/vars && \ chmod +x /usr/local/bin/worker-audits && \ chmod +x /usr/local/bin/worker-certificates && \ - chmod +x /usr/local/bin/worker-database && \ + chmod +x /usr/local/bin/worker-databases && \ chmod +x /usr/local/bin/worker-deletes && \ chmod +x /usr/local/bin/worker-functions && \ chmod +x /usr/local/bin/worker-builds && \ diff --git a/README-CN.md b/README-CN.md index 9dff7e1da..25436b970 100644 --- a/README-CN.md +++ b/README-CN.md @@ -109,7 +109,7 @@ docker run -it --rm , * [**帐户**](https://appwrite.io/docs/client/account) -管理当前用户的帐户和登录方式。跟踪和管理用户 Session,登录设备,登录方法和查看相关记录。 * [**用户**](https://appwrite.io/docs/server/users) - 在以管理员模式登录时管理和列出所有用户。 * [**团队**](https://appwrite.io/docs/client/teams) - 管理用户分组。邀请成员,管理团队中的用户权限和用户角色。 -* [**数据库**](https://appwrite.io/docs/client/database) - 管理数据库文档和文档集。用检索界面来对文档和文档集进行读取,创建,更新,和删除。 +* [**数据库**](https://appwrite.io/docs/client/databases) - 管理数据库文档和文档集。用检索界面来对文档和文档集进行读取,创建,更新,和删除。 * [**贮存**](https://appwrite.io/docs/client/storage) - 管理文件的阅读、创建、删除和预览。设置文件的预览来满足程序的个性化需求。所有文件都由 ClamAV 扫描并安全存储和加密。 * [**云函数**](https://appwrite.io/docs/server/functions) - 在安全,隔离的环境中运行自定义代码。这些代码可以被事件,CRON,或者手动操作触发。 * [**语言适配**](https://appwrite.io/docs/client/locale) - 根据用户所在的的国家和地区做出合适的语言适配。 diff --git a/README.md b/README.md index 4f23929f4..97c8138c2 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Getting started with Appwrite is as easy as creating a new project, choosing you * [**Account**](https://appwrite.io/docs/client/account) - Manage current user authentication and account. Track and manage the user sessions, devices, sign-in methods, and security logs. * [**Users**](https://appwrite.io/docs/server/users) - Manage and list all project users when in admin mode. * [**Teams**](https://appwrite.io/docs/client/teams) - Manage and group users in teams. Manage memberships, invites, and user roles within a team. -* [**Database**](https://appwrite.io/docs/client/database) - Manage database collections and documents. Read, create, update, and delete documents and filter lists of document collections using advanced filters. +* [**Databases**](https://appwrite.io/docs/client/databases) - Manage databases, collections and documents. Read, create, update, and delete documents and filter lists of document collections using advanced filters. * [**Storage**](https://appwrite.io/docs/client/storage) - Manage storage files. Read, create, delete, and preview files. Manipulate the preview of your files to fit your app perfectly. All files are scanned by ClamAV and stored in a secure and encrypted way. * [**Functions**](https://appwrite.io/docs/server/functions) - Customize your Appwrite server by executing your custom code in a secure, isolated environment. You can trigger your code on any Appwrite system event, manually or using a CRON schedule. * [**Locale**](https://appwrite.io/docs/client/locale) - Track your user's location, and manage your app locale-based data. diff --git a/app/config/collections.php b/app/config/collections.php index 6a11a3eac..ecbe92c33 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -16,11 +16,69 @@ $auth = Config::getParam('auth', []); */ $collections = [ - 'collections' => [ + 'databases' => [ '$collection' => Database::METADATA, + '$id' => 'databases', + 'name' => 'Databases', + 'attributes' => [ + [ + '$id' => 'name', + 'type' => Database::VAR_STRING, + 'size' => 256, + 'required' => true, + 'signed' => true, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => 'search', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + ], + 'indexes' => [ + [ + '$id' => '_fulltext_search', + 'type' => Database::INDEX_FULLTEXT, + 'attributes' => ['search'], + 'lengths' => [], + 'orders' => [], + ], + ], + ], + 'collections' => [ + '$collection' => 'databases', '$id' => 'collections', 'name' => 'Collections', 'attributes' => [ + [ + '$id' => 'databaseInternalId', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => 'databaseId', + 'type' => Database::VAR_STRING, + 'signed' => true, + 'size' => Database::LENGTH_KEY, + 'format' => '', + 'filters' => [], + 'required' => true, + 'default' => null, + 'array' => false, + ], [ '$id' => 'name', 'type' => Database::VAR_STRING, @@ -97,6 +155,28 @@ $collections = [ '$id' => 'attributes', 'name' => 'Attributes', 'attributes' => [ + [ + '$id' => 'databaseInternalId', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => 'databaseId', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => false, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => 'collectionInternalId', 'type' => Database::VAR_STRING, @@ -114,7 +194,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -238,11 +318,11 @@ $collections = [ ], 'indexes' => [ [ - '$id' => '_key_collection', + '$id' => '_key_db_collection', 'type' => Database::INDEX_KEY, - 'attributes' => ['collectionInternalId'], - 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC], + 'attributes' => ['databaseInternalId', 'collectionInternalId'], + 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], ], ], ], @@ -252,6 +332,28 @@ $collections = [ '$id' => 'indexes', 'name' => 'Indexes', 'attributes' => [ + [ + '$id' => 'databaseInternalId', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => 'databaseId', + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => false, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], [ '$id' => 'collectionInternalId', 'type' => Database::VAR_STRING, @@ -269,7 +371,7 @@ $collections = [ 'format' => '', 'size' => Database::LENGTH_KEY, 'signed' => true, - 'required' => false, + 'required' => true, 'default' => null, 'array' => false, 'filters' => [], @@ -343,12 +445,12 @@ $collections = [ ], 'indexes' => [ [ - '$id' => '_key_collection', + '$id' => '_key_db_collection', 'type' => Database::INDEX_KEY, - 'attributes' => ['collectionInternalId'], - 'lengths' => [Database::LENGTH_KEY], - 'orders' => [Database::ORDER_ASC], - ] + 'attributes' => ['databaseInternalId', 'collectionInternalId'], + 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], + ], ], ], diff --git a/app/config/events.php b/app/config/events.php index 2c2ded49d..0a7d81914 100644 --- a/app/config/events.php +++ b/app/config/events.php @@ -69,54 +69,68 @@ return [ ], ] ], - 'collections' => [ - '$model' => Response::MODEL_COLLECTION, + 'databases' => [ + '$model' => Response::MODEL_DATABASE, '$resource' => true, - '$description' => 'This event triggers on any collection event.', - 'documents' => [ - '$model' => Response::MODEL_DOCUMENT, + '$description' => 'This event triggers on any database event.', + 'collections' => [ + '$model' => Response::MODEL_COLLECTION, '$resource' => true, - '$description' => 'This event triggers on any documents event.', + '$description' => 'This event triggers on any collection event.', + 'documents' => [ + '$model' => Response::MODEL_DOCUMENT, + '$resource' => true, + '$description' => 'This event triggers on any documents event.', + 'create' => [ + '$description' => 'This event triggers when a document is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when a document is deleted.' + ], + 'update' => [ + '$description' => 'This event triggers when a document is updated.' + ], + ], + 'indexes' => [ + '$model' => Response::MODEL_INDEX, + '$resource' => true, + '$description' => 'This event triggers on any indexes event.', + 'create' => [ + '$description' => 'This event triggers when an index is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when an index is deleted.' + ] + ], + 'attributes' => [ + '$model' => Response::MODEL_ATTRIBUTE, + '$resource' => true, + '$description' => 'This event triggers on any attributes event.', + 'create' => [ + '$description' => 'This event triggers when an attribute is created.', + ], + 'delete' => [ + '$description' => 'This event triggers when an attribute is deleted.' + ] + ], 'create' => [ - '$description' => 'This event triggers when a document is created.', + '$description' => 'This event triggers when a collection is created.' ], 'delete' => [ - '$description' => 'This event triggers when a document is deleted.' + '$description' => 'This event triggers when a collection is deleted.', ], 'update' => [ - '$description' => 'This event triggers when a document is updated.' - ], - ], - 'indexes' => [ - '$model' => Response::MODEL_INDEX, - '$resource' => true, - '$description' => 'This event triggers on any indexes event.', - 'create' => [ - '$description' => 'This event triggers when an index is created.', - ], - 'delete' => [ - '$description' => 'This event triggers when an index is deleted.' - ] - ], - 'attributes' => [ - '$model' => Response::MODEL_ATTRIBUTE, - '$resource' => true, - '$description' => 'This event triggers on any attributes event.', - 'create' => [ - '$description' => 'This event triggers when an attribute is created.', - ], - 'delete' => [ - '$description' => 'This event triggers when an attribute is deleted.' + '$description' => 'This event triggers when a collection is updated.', ] ], 'create' => [ - '$description' => 'This event triggers when a collection is created.' + '$description' => 'This event triggers when a database is created.' ], 'delete' => [ - '$description' => 'This event triggers when a collection is deleted.', + '$description' => 'This event triggers when a database is deleted.', ], 'update' => [ - '$description' => 'This event triggers when a collection is updated.', + '$description' => 'This event triggers when a database is updated.', ] ], 'buckets' => [ diff --git a/app/config/roles.php b/app/config/roles.php index ee2f2b970..72b1d505b 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -32,6 +32,8 @@ $admins = [ 'buckets.write', 'users.read', 'users.write', + 'databases.read', + 'databases.write', 'collections.read', 'collections.write', 'platforms.read', diff --git a/app/config/scopes.php b/app/config/scopes.php index 0b9879b64..e05845491 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -13,6 +13,12 @@ return [ // List of publicly visible scopes 'teams.write' => [ 'description' => 'Access to create, update, and delete your project\'s teams', ], + 'databases.read' => [ + 'description' => 'Access to read your project\'s databases', + ], + 'databases.write' => [ + 'description' => 'Access to create, update, and delete your project\'s databases', + ], 'collections.read' => [ 'description' => 'Access to read your project\'s database collections', ], diff --git a/app/config/services.php b/app/config/services.php index 2225112ea..a9ee4b084 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -53,18 +53,18 @@ return [ 'optional' => true, 'icon' => '/images/services/avatars.png', ], - 'database' => [ - 'key' => 'database', - 'name' => 'Database', - 'subtitle' => 'The Database service allows you to create structured collections of documents, query and filter lists of documents', - 'description' => '/docs/services/database.md', - 'controller' => 'api/database.php', + 'databases' => [ + 'key' => 'databases', + 'name' => 'Databases', + 'subtitle' => 'The Databases service allows you to create structured collections of documents, query and filter lists of documents', + 'description' => '/docs/services/databases.md', + 'controller' => 'api/databases.php', 'sdk' => true, 'docs' => true, - 'docsUrl' => 'https://appwrite.io/docs/client/database', + 'docsUrl' => 'https://appwrite.io/docs/client/databases', 'tests' => false, 'optional' => true, - 'icon' => '/images/services/database.png', + 'icon' => '/images/services/databases.png', ], 'locale' => [ 'key' => 'locale', diff --git a/app/config/specs/open-api3-0.15.x-client.json b/app/config/specs/open-api3-0.15.x-client.json index ea21e8462..20329e88c 100644 --- a/app/config/specs/open-api3-0.15.x-client.json +++ b/app/config/specs/open-api3-0.15.x-client.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":39,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":50,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":49,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":40,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":45,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":41,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":47,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null}},"required":["userId","number"]}}}}},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"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).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","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.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}}},"tags":[{"name":"account","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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":40,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":51,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":50,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":41,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":47,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":42,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null}},"required":["userId","number"]}}}}},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":49,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databasesUpdateDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-0.15.x-console.json b/app/config/specs/open-api3-0.15.x-console.json index 9c033838a..f529afeb4 100644 --- a/app/config/specs/open-api3-0.15.x-console.json +++ b/app/config/specs/open-api3-0.15.x-console.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":39,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":50,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":49,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":40,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":45,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":41,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":47,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null}},"required":["userId","number"]}}}}},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","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).","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":79,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":78,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","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.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":80,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":84,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":85,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":94,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":93,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":87,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":88,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":92,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":91,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":89,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":90,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":95,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":96,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"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).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","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.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databaseListDocumentLogs","tags":["database"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","weight":104,"cookies":false,"type":"","demo":"database\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":98,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","tags":["database"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":97,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","tags":["database"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":99,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":100,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databaseListCollectionLogs","tags":["database"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","weight":83,"cookies":false,"type":"","demo":"database\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/database\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databaseGetUsage","tags":["database"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getUsage","weight":81,"cookies":false,"type":"","demo":"database\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/database\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databaseGetCollectionUsage","tags":["database"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"database\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":204,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","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.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":203,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","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.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":205,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":206,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":208,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":210,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":212,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","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.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":211,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","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.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":213,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"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.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":209,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":214,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":207,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":114,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":124,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":117,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":116,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":121,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":122,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":120,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":119,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":123,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"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.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":118,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","weight":127,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the project used as the starting point for the query, excluding the project 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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","weight":126,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","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.","x-example":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","weight":128,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","weight":130,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":135,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","weight":133,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","weight":134,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domainList"}}}}},"x-appwrite":{"method":"listDomains","weight":153,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","tags":["projects"],"description":"","responses":{"201":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"createDomain","weight":152,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null}},"required":["domain"]}}}}}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"getDomain","weight":154,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":156,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"updateDomainVerification","weight":155,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","weight":143,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","weight":142,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","weight":144,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","weight":145,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":146,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","weight":132,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","weight":148,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","weight":147,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":null}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","weight":149,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","weight":150,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":151,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","weight":131,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account"},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":129,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","weight":137,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","weight":136,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","weight":138,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","weight":139,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":141,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":140,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":158,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":157,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","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.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":159,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":160,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":161,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","weight":170,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":171,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":183,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":185,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":184,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","weight":202,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"provider","description":"Provider Name.","required":false,"schema":{"type":"string","x-example":"email","default":""},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":186,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":201,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":196,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":190,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":189,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":194,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":195,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":197,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":null}},"required":["number"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":187,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"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.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":198,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":188,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":200,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":199,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":191,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":192,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":193,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":""}},"required":["total","metrics"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAuth0Appid":{"type":"string","description":"Auth0 OAuth app ID.","x-example":"123247283472834787438"},"providerAuth0Secret":{"type":"string","description":"Auth0 OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDailymotionAppid":{"type":"string","description":"Dailymotion OAuth app ID.","x-example":"123247283472834787438"},"providerDailymotionSecret":{"type":"string","description":"Dailymotion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerOktaAppid":{"type":"string","description":"Okta OAuth app ID.","x-example":"123247283472834787438"},"providerOktaSecret":{"type":"string","description":"Okta OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabase":{"type":"boolean","description":"Database service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerAuth0Appid","providerAuth0Secret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDailymotionAppid","providerDailymotionSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerOktaAppid","providerOktaSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerStripeAppid","providerStripeSecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerWordpressAppid","providerWordpressSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerZoomAppid","providerZoomSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabase","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Webhook creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Webhook update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Key creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Key update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"integer","description":"Key expiration in Unix timestamp.","x-example":"1653990687","format":"int32"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Domain creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Domain update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"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"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":40,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":51,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":50,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":41,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":47,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":42,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null}},"required":["userId","number"]}}}}},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":49,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"list","weight":80,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":79,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-database.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","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.","x-example":"[DATABASE_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","weight":112,"cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"get","weight":81,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"update","weight":83,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":84,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":86,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":85,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","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.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":87,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":89,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":90,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":99,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":98,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":92,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":93,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":97,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":96,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":94,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":91,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":95,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":100,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":101,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databasesUpdateDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","weight":109,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":103,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":102,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":104,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":105,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","weight":88,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":114,"cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListLogs","tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":82,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","weight":113,"cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":212,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","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.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":211,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","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.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":213,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":214,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":216,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":218,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":220,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","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.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":219,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","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.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":221,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"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.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":217,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":222,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":215,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":132,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":125,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":124,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":129,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":130,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":128,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":127,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":131,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"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.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":126,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","weight":135,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the project used as the starting point for the query, excluding the project 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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","weight":134,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","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.","x-example":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","weight":136,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","weight":138,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":143,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","weight":141,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","weight":142,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domainList"}}}}},"x-appwrite":{"method":"listDomains","weight":161,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","tags":["projects"],"description":"","responses":{"201":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"createDomain","weight":160,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null}},"required":["domain"]}}}}}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"getDomain","weight":162,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":164,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"updateDomainVerification","weight":163,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","weight":151,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","weight":150,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","weight":152,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","weight":153,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":154,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","weight":140,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","weight":156,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","weight":155,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":null}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","weight":157,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","weight":158,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":159,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","weight":139,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account"},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":137,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","weight":145,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","weight":144,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","weight":146,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","weight":147,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":149,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":148,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":166,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":165,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","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.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":167,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":168,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":169,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","weight":178,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":179,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":191,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","weight":210,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"provider","description":"Provider Name.","required":false,"schema":{"type":"string","x-example":"email","default":""},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":194,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":209,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":204,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":198,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":197,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":202,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":203,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":205,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":null}},"required":["number"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":195,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"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.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":206,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":196,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":208,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":207,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":199,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":200,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":201,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":""}},"required":["total","metrics"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"}},"required":["$id","name"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","databaseId","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAuth0Appid":{"type":"string","description":"Auth0 OAuth app ID.","x-example":"123247283472834787438"},"providerAuth0Secret":{"type":"string","description":"Auth0 OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDailymotionAppid":{"type":"string","description":"Dailymotion OAuth app ID.","x-example":"123247283472834787438"},"providerDailymotionSecret":{"type":"string","description":"Dailymotion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerOktaAppid":{"type":"string","description":"Okta OAuth app ID.","x-example":"123247283472834787438"},"providerOktaSecret":{"type":"string","description":"Okta OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerAuth0Appid","providerAuth0Secret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDailymotionAppid","providerDailymotionSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerOktaAppid","providerOktaSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerStripeAppid","providerStripeSecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerWordpressAppid","providerWordpressSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerZoomAppid","providerZoomSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Webhook creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Webhook update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Key creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Key update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"integer","description":"Key expiration in Unix timestamp.","x-example":"1653990687","format":"int32"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Domain creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Domain update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-0.15.x-server.json b/app/config/specs/open-api3-0.15.x-server.json index 75f612287..c3e5b4762 100644 --- a/app/config/specs/open-api3-0.15.x-server.json +++ b/app/config/specs/open-api3-0.15.x-server.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","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).","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":79,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":78,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","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.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":80,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":84,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":85,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":94,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":93,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":87,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":88,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":92,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":91,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":89,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":90,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":95,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":96,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"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).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","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.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":98,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","tags":["database"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":97,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","tags":["database"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":99,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":100,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":204,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","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.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":203,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","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.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":205,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":206,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":208,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":210,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":212,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","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.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":211,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","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.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":213,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"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.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":209,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":214,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":114,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":124,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":117,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":116,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":121,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":122,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":120,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":119,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":123,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"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.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":118,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":158,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":157,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","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.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":159,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":160,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":161,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":185,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":184,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":186,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":201,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":196,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":190,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":189,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":194,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":195,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":197,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":null}},"required":["number"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":187,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"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.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":198,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":188,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":200,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":199,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":191,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":192,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":193,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"list","weight":80,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":79,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-database.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","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.","x-example":"[DATABASE_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"get","weight":81,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"update","weight":83,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":84,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":86,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":85,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","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.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":87,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":89,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":90,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":99,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":98,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":92,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":93,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":97,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":96,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":94,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":91,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":95,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":100,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":101,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databasesUpdateDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":103,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":102,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":104,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":105,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":212,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","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.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":211,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","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.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":213,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":214,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":216,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":218,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":220,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","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.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":219,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","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.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":221,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"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.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":217,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":222,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":132,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":125,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":124,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":129,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":130,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":128,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":127,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":131,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"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.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":126,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":166,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":165,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","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.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":167,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":168,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":169,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":194,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":209,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":204,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":198,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":197,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":202,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":203,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":205,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":null}},"required":["number"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":195,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"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.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":206,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":196,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":208,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":207,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":199,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":200,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":201,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"}},"required":["$id","name"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","databaseId","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index ea21e8462..20329e88c 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":39,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":50,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":49,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":40,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":45,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":41,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":47,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null}},"required":["userId","number"]}}}}},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"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).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","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.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}}},"tags":[{"name":"account","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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":40,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":51,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":50,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":41,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":47,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":42,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null}},"required":["userId","number"]}}}}},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":49,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databasesUpdateDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 9c033838a..f529afeb4 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":39,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":50,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":49,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":40,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":45,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":41,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":47,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null}},"required":["userId","number"]}}}}},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","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).","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":79,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":78,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","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.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":80,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":84,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":85,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":94,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":93,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":87,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":88,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":92,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":91,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":89,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":90,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":95,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":96,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"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).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","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.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databaseListDocumentLogs","tags":["database"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","weight":104,"cookies":false,"type":"","demo":"database\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":98,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","tags":["database"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":97,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","tags":["database"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":99,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":100,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databaseListCollectionLogs","tags":["database"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","weight":83,"cookies":false,"type":"","demo":"database\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/database\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databaseGetUsage","tags":["database"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getUsage","weight":81,"cookies":false,"type":"","demo":"database\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/database\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databaseGetCollectionUsage","tags":["database"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"database\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":204,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","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.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":203,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","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.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":205,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":206,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":208,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":210,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":212,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","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.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":211,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","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.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":213,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"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.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":209,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":214,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":207,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":114,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":124,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":117,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":116,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":121,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":122,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":120,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":119,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":123,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"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.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":118,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","weight":127,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the project used as the starting point for the query, excluding the project 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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","weight":126,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","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.","x-example":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","weight":128,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","weight":130,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":135,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","weight":133,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","weight":134,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domainList"}}}}},"x-appwrite":{"method":"listDomains","weight":153,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","tags":["projects"],"description":"","responses":{"201":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"createDomain","weight":152,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null}},"required":["domain"]}}}}}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"getDomain","weight":154,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":156,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"updateDomainVerification","weight":155,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","weight":143,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","weight":142,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","weight":144,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","weight":145,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":146,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","weight":132,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","weight":148,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","weight":147,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":null}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","weight":149,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","weight":150,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":151,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","weight":131,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account"},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":129,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","weight":137,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","weight":136,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","weight":138,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","weight":139,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":141,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":140,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":158,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":157,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","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.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":159,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":160,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":161,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","weight":170,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":171,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":183,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":185,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":184,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","weight":202,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"provider","description":"Provider Name.","required":false,"schema":{"type":"string","x-example":"email","default":""},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":186,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":201,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":196,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":190,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":189,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":194,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":195,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":197,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":null}},"required":["number"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":187,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"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.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":198,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":188,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":200,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":199,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":191,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":192,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":193,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":""}},"required":["total","metrics"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAuth0Appid":{"type":"string","description":"Auth0 OAuth app ID.","x-example":"123247283472834787438"},"providerAuth0Secret":{"type":"string","description":"Auth0 OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDailymotionAppid":{"type":"string","description":"Dailymotion OAuth app ID.","x-example":"123247283472834787438"},"providerDailymotionSecret":{"type":"string","description":"Dailymotion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerOktaAppid":{"type":"string","description":"Okta OAuth app ID.","x-example":"123247283472834787438"},"providerOktaSecret":{"type":"string","description":"Okta OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabase":{"type":"boolean","description":"Database service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerAuth0Appid","providerAuth0Secret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDailymotionAppid","providerDailymotionSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerOktaAppid","providerOktaSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerStripeAppid","providerStripeSecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerWordpressAppid","providerWordpressSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerZoomAppid","providerZoomSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabase","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Webhook creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Webhook update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Key creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Key update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"integer","description":"Key expiration in Unix timestamp.","x-example":"1653990687","format":"int32"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Domain creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Domain update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"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"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":40,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/jwt"}}}}},"x-appwrite":{"method":"createJWT","weight":51,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createAnonymousSession","weight":50,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"createEmailSession","weight":41,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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.","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}}}},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateMagicURLSession","weight":47,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"File"}},"x-appwrite":{"method":"createOAuth2Session","weight":42,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"schema":{"type":"string","x-example":"amazon"},"in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com","default":""},"in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null}},"required":["userId","number"]}}}}},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updatePhoneSession","weight":49,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"list","weight":80,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":79,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-database.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","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.","x-example":"[DATABASE_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabases"}}}}},"x-appwrite":{"method":"getUsage","weight":112,"cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"get","weight":81,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"update","weight":83,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":84,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":86,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":85,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","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.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":87,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":89,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":90,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":99,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":98,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":92,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":93,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":97,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":96,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":94,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":91,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":95,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":100,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":101,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databasesUpdateDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listDocumentLogs","weight":109,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":103,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":102,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":104,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":105,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listCollectionLogs","weight":88,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageCollection"}}}}},"x-appwrite":{"method":"getCollectionUsage","weight":114,"cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListLogs","tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":82,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageDatabase"}}}}},"x-appwrite":{"method":"getDatabaseUsage","weight":113,"cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"range","description":"`Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":212,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","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.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":211,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","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.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":213,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":214,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":216,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":218,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":220,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","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.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":219,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","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.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":221,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"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.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":217,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":222,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageFunctions"}}}}},"x-appwrite":{"method":"getUsage","weight":215,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":132,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":125,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":124,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":129,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":130,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":128,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":127,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":131,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"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.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":126,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/projectList"}}}}},"x-appwrite":{"method":"list","weight":135,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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. [learn more about pagination](https:\/\/appwrite.io\/docs\/pagination)","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"},{"name":"cursor","description":"ID of the project used as the starting point for the query, excluding the project 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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Project","operationId":"projectsCreate","tags":["projects"],"description":"","responses":{"201":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"create","weight":134,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","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.","x-example":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}}}}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"get","weight":136,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"update","weight":138,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Project","operationId":"projectsDelete","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":143,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthLimit","weight":141,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","x-example":0}},"required":["limit"]}}}}}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateAuthStatus","weight":142,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"schema":{"type":"string","x-example":"email-password"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","x-example":false}},"required":["status"]}}}}}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domainList"}}}}},"x-appwrite":{"method":"listDomains","weight":161,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","tags":["projects"],"description":"","responses":{"201":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"createDomain","weight":160,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","x-example":null}},"required":["domain"]}}}}}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"getDomain","weight":162,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":164,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","tags":["projects"],"description":"","responses":{"200":{"description":"Domain","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/domain"}}}}},"x-appwrite":{"method":"updateDomainVerification","weight":163,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"schema":{"type":"string","x-example":"[DOMAIN_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/keyList"}}}}},"x-appwrite":{"method":"listKeys","weight":151,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","tags":["projects"],"description":"","responses":{"201":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"createKey","weight":150,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"getKey","weight":152,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","tags":["projects"],"description":"","responses":{"200":{"description":"Key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/key"}}}}},"x-appwrite":{"method":"updateKey","weight":153,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","x-example":null}},"required":["name","scopes"]}}}}},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":154,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"schema":{"type":"string","x-example":"[KEY_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateOAuth2","weight":140,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","x-example":"[SECRET]"}},"required":["provider"]}}}}}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platformList"}}}}},"x-appwrite":{"method":"listPlatforms","weight":156,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","tags":["projects"],"description":"","responses":{"201":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"createPlatform","weight":155,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","x-example":null}},"required":["type","name"]}}}}}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"getPlatform","weight":157,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","tags":["projects"],"description":"","responses":{"200":{"description":"Platform","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/platform"}}}}},"x-appwrite":{"method":"updatePlatform","weight":158,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","x-example":null}},"required":["name"]}}}}},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":159,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"schema":{"type":"string","x-example":"[PLATFORM_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","tags":["projects"],"description":"","responses":{"200":{"description":"Project","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/project"}}}}},"x-appwrite":{"method":"updateServiceStatus","weight":139,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","x-example":"account"},"status":{"type":"boolean","description":"Service status.","x-example":false}},"required":["service","status"]}}}}}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageProject"}}}}},"x-appwrite":{"method":"getUsage","weight":137,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhookList"}}}}},"x-appwrite":{"method":"listWebhooks","weight":145,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"createWebhook","weight":144,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"getWebhook","weight":146,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhook","weight":147,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}}}},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":149,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/webhook"}}}}},"x-appwrite":{"method":"updateWebhookSignature","weight":148,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"schema":{"type":"string","x-example":"[PROJECT_ID]"},"in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"schema":{"type":"string","x-example":"[WEBHOOK_ID]"},"in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":166,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":165,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","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.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":167,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":168,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":169,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageStorage"}}}}},"x-appwrite":{"method":"getUsage","weight":178,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageBuckets"}}}}},"x-appwrite":{"method":"getBucketUsage","weight":179,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"listLogs","weight":191,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/usageUsers"}}}}},"x-appwrite":{"method":"getUsage","weight":210,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"schema":{"type":"string","x-example":"24h","default":"30d"},"in":"query"},{"name":"provider","description":"Provider Name.","required":false,"schema":{"type":"string","x-example":"email","default":""},"in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":194,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":209,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":204,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":198,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":197,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":202,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":203,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":205,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":null}},"required":["number"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":195,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"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.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":206,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":196,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":208,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":207,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":199,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":200,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":201,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"$ref":"#\/components\/schemas\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"$ref":"#\/components\/schemas\/metric"},"x-example":""}},"required":["total","metrics"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"}},"required":["$id","name"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","databaseId","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"$ref":"#\/components\/schemas\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"$ref":"#\/components\/schemas\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"$ref":"#\/components\/schemas\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"$ref":"#\/components\/schemas\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAuth0Appid":{"type":"string","description":"Auth0 OAuth app ID.","x-example":"123247283472834787438"},"providerAuth0Secret":{"type":"string","description":"Auth0 OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDailymotionAppid":{"type":"string","description":"Dailymotion OAuth app ID.","x-example":"123247283472834787438"},"providerDailymotionSecret":{"type":"string","description":"Dailymotion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerOktaAppid":{"type":"string","description":"Okta OAuth app ID.","x-example":"123247283472834787438"},"providerOktaSecret":{"type":"string","description":"Okta OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerAuth0Appid","providerAuth0Secret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDailymotionAppid","providerDailymotionSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerOktaAppid","providerOktaSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerStripeAppid","providerStripeSecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerWordpressAppid","providerWordpressSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerZoomAppid","providerZoomSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Webhook creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Webhook update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Key creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Key update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"integer","description":"Key expiration in Unix timestamp.","x-example":"1653990687","format":"int32"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Domain creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Domain update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"$ref":"#\/components\/schemas\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 75f612287..c3e5b4762 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -1 +1 @@ -{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/database\/collections":{"get":{"summary":"List Collections","operationId":"databaseListCollections","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).","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":79,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":78,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","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.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/database\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databaseGetCollection","tags":["database"],"description":"Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":80,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":84,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databaseDeleteCollection","tags":["database"],"description":"Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":85,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":94,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":93,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":87,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":88,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":92,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":91,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":89,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":90,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":95,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":96,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","tags":["database"],"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).","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databaseCreateDocument","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.","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databaseUpdateDocument","tags":["database"],"description":"Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":98,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","tags":["database"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":97,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","tags":["database"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":99,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":100,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":204,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","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.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":203,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","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.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":205,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":206,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":208,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":210,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":212,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","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.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":211,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","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.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":213,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"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.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":209,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":214,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":114,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":124,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":117,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":116,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":121,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":122,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":120,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":119,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":123,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"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.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":118,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":158,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":157,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","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.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":159,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":160,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":161,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":185,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":184,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":186,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":201,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":196,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":190,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":189,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":194,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":195,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":197,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":null}},"required":["number"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":187,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"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.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":198,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":188,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":200,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":199,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":191,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":192,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":193,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"openapi":"3.0.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"servers":[{"url":"https:\/\/HOSTNAME\/v1"}],"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","tags":["account"],"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","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["email","password"]}}}}}},"\/account\/logs":{"get":{"summary":"Get Account Logs","operationId":"accountGetLogs","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.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/account\/name":{"patch":{"summary":"Update Account Name","operationId":"accountUpdateName","tags":["account"],"description":"Update currently logged in user account name.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/account\/password":{"patch":{"summary":"Update Account Password","operationId":"accountUpdatePassword","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"}},"required":["number","password"]}}}}}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","tags":["account"],"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.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","tags":["account"],"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.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["email","url"]}}}}},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}}}}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","tags":["account"],"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.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/session"}}}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to update the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]},"delete":{"summary":"Delete Account Session","operationId":"accountDeleteSession","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/verification":{"post":{"summary":"Create Email Verification","operationId":"accountCreateVerification","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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"url":{"type":"string","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.","x-example":"https:\/\/example.com"}},"required":["url"]}}}}},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","tags":["account"],"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.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/token"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"schema":{"type":"string","x-example":"aa"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/credit-cards\/{code}":{"get":{"summary":"Get Credit Card Icon","operationId":"avatarsGetCreditCard","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"schema":{"type":"string","x-example":"amex"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Website URL which you want to fetch the favicon from.","required":true,"schema":{"type":"string","format":"url","x-example":"https:\/\/example.com"},"in":"query"}]}},"\/avatars\/flags\/{code}":{"get":{"summary":"Get Country Flag","operationId":"avatarsGetFlag","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Country Code. ISO Alpha-2 country code format.","required":true,"schema":{"type":"string","x-example":"af"},"in":"path"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":100},"in":"query"}]}},"\/avatars\/image":{"get":{"summary":"Get Image from URL","operationId":"avatarsGetImage","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","description":"Image URL which you want to crop.","required":true,"schema":{"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. Defaults to 400.","required":false,"schema":{"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. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":400},"in":"query"}]}},"\/avatars\/initials":{"get":{"summary":"Get User Initials","operationId":"avatarsGetInitials","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"schema":{"type":"string","x-example":"[NAME]","default":""},"in":"query"},{"name":"width","description":"Image width. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"height","description":"Image height. Pass an integer between 0 to 2000. Defaults to 100.","required":false,"schema":{"type":"integer","format":"int32","x-example":0,"default":500},"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"schema":{"type":"string","default":""},"in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","description":"Plain text to be converted to QR code image.","required":true,"schema":{"type":"string","x-example":"[TEXT]"},"in":"query"},{"name":"size","description":"QR code size. Pass an integer between 1 to 1000. Defaults to 400.","required":false,"schema":{"type":"integer","format":"int32","x-example":1,"default":400},"in":"query"},{"name":"margin","description":"Margin from edge. Pass an integer between 0 to 10. Defaults to 1.","required":false,"schema":{"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,"schema":{"type":"boolean","x-example":false,"default":false},"in":"query"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"list","weight":80,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","tags":["databases"],"description":"","responses":{"201":{"description":"Database","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/database"}}}}},"x-appwrite":{"method":"create","weight":79,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-database.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"databaseId":{"type":"string","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.","x-example":"[DATABASE_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["databaseId","name"]}}}}}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"get","weight":81,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"update","weight":83,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Database","operationId":"databasesDelete","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":84,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collectionList"}}}}},"x-appwrite":{"method":"listCollections","weight":86,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","tags":["databases"],"description":"","responses":{"201":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"createCollection","weight":85,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"collectionId":{"type":"string","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.","x-example":"[COLLECTION_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","x-example":"[NAME]"},"permission":{"type":"string","description":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [learn more about permissions](https:\/\/appwrite.io\/docs\/permissions) and get a full list of available permissions.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["collectionId","name","permission","read","write"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"getCollection","weight":87,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","tags":["databases"],"description":"","responses":{"200":{"description":"Collection","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/collection"}}}}},"x-appwrite":{"method":"updateCollection","weight":89,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is collection enabled?","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Collection","operationId":"databasesDeleteCollection","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":90,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeList"}}}}},"x-appwrite":{"method":"listAttributes","weight":99,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeBoolean","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeBoolean"}}}}},"x-appwrite":{"method":"createBooleanAttribute","weight":98,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEmail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEmail"}}}}},"x-appwrite":{"method":"createEmailAttribute","weight":92,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEnum","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeEnum"}}}}},"x-appwrite":{"method":"createEnumAttribute","weight":93,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"elements":{"type":"array","description":"Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 1024 characters long.","x-example":null,"items":{"type":"string"}},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","elements","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeFloat","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeFloat"}}}}},"x-appwrite":{"method":"createFloatAttribute","weight":97,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"number","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"number","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeInteger","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeInteger"}}}}},"x-appwrite":{"method":"createIntegerAttribute","weight":96,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"min":{"type":"integer","description":"Minimum value to enforce on new documents","x-example":null},"max":{"type":"integer","description":"Maximum value to enforce on new documents","x-example":null},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeIP","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeIp"}}}}},"x-appwrite":{"method":"createIpAttribute","weight":94,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeString","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeString"}}}}},"x-appwrite":{"method":"createStringAttribute","weight":91,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"size":{"type":"integer","description":"Attribute size for text attributes, in number of characters.","x-example":1},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","size","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","tags":["databases"],"description":"","responses":{"201":{"description":"AttributeURL","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/attributeUrl"}}}}},"x-appwrite":{"method":"createUrlAttribute","weight":95,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":null},"required":{"type":"boolean","description":"Is attribute required?","x-example":false},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false}},"required":["key","required"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]}}}}},"x-appwrite":{"method":"getAttribute","weight":100,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databasesDeleteAttribute","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":101,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Attribute Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/documentList"}}}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"queries","description":"Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderAttributes","description":"Array of attributes used to sort results. Maximum of 100 order attributes are allowed, each 128 characters long.","required":false,"schema":{"type":"array","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. Maximum of 100 order types are allowed.","required":false,"schema":{"type":"array","items":{"type":"string"},"default":[]},"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","tags":["databases"],"description":"","responses":{"201":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","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,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":"[DOCUMENT_ID]"},"data":{"type":"object","description":"Document data as JSON object.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["documentId","data"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Document","operationId":"databasesUpdateDocument","tags":["databases"],"description":"","responses":{"200":{"description":"Document","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/document"}}}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","x-example":"{}"},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["data"]}}}}},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"documentId","description":"Document ID.","required":true,"schema":{"type":"string","x-example":"[DOCUMENT_ID]"},"in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/indexList"}}}}},"x-appwrite":{"method":"listIndexes","weight":103,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","tags":["databases"],"description":"","responses":{"201":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"createIndex","weight":102,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":null},"type":{"type":"string","description":"Index type.","x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}}}}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","tags":["databases"],"description":"","responses":{"200":{"description":"Index","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/index"}}}}},"x-appwrite":{"method":"getIndex","weight":104,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]},"delete":{"summary":"Delete Index","operationId":"databasesDeleteIndex","tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":105,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"schema":{"type":"string","x-example":"[DATABASE_ID]"},"in":"path"},{"name":"collectionId","description":"Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/database#createCollection).","required":true,"schema":{"type":"string","x-example":"[COLLECTION_ID]"},"in":"path"},{"name":"key","description":"Index Key.","required":true,"schema":{"type":"string"},"in":"path"}]}},"\/functions":{"get":{"summary":"List Functions","operationId":"functionsList","tags":["functions"],"description":"Get a list of all the project's functions. You can use the query params to filter your results.","responses":{"200":{"description":"Functions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/functionList"}}}}},"x-appwrite":{"method":"list","weight":212,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Function","operationId":"functionsCreate","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.","responses":{"201":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"create","weight":211,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"functionId":{"type":"string","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.","x-example":"[FUNCTION_ID]"},"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"runtime":{"type":"string","description":"Execution runtime.","x-example":"node-14.5"},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Function maximum execution time in seconds.","x-example":1}},"required":["functionId","name","execute","runtime"]}}}}}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/runtimeList"}}}}},"x-appwrite":{"method":"listRuntimes","weight":213,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"get","weight":214,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"update","weight":216,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Function name. Max length: 128 chars.","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. Maximum of 100 scopes are allowed, each 64 characters long.","x-example":null,"items":{"type":"string"}},"vars":{"type":"object","description":"Key-value JSON object that will be passed to the function as environment variables.","x-example":"{}"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","x-example":null,"items":{"type":"string"}},"schedule":{"type":"string","description":"Schedule CRON syntax.","x-example":null},"timeout":{"type":"integer","description":"Maximum execution time in seconds.","x-example":1}},"required":["name","execute"]}}}}},"delete":{"summary":"Delete Function","operationId":"functionsDelete","tags":["functions"],"description":"Delete a function by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":218,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"listDeployments","weight":220,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Deployment","operationId":"functionsCreateDeployment","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.","responses":{"201":{"description":"Deployment","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deployment"}}}}},"x-appwrite":{"method":"createDeployment","weight":219,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"entrypoint":{"type":"string","description":"Entrypoint File.","x-example":"[ENTRYPOINT]"},"code":{"type":"string","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.","x-example":null},"activate":{"type":"boolean","description":"Automatically activate the deployment when it is finished building.","x-example":false}},"required":["entrypoint","code","activate"]}}}}}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/deploymentList"}}}}},"x-appwrite":{"method":"getDeployment","weight":221,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","tags":["functions"],"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.","responses":{"200":{"description":"Function","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/function"}}}}},"x-appwrite":{"method":"updateDeployment","weight":217,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":222,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"schema":{"type":"string","x-example":"[DEPLOYMENT_ID]"},"in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"schema":{"type":"string","x-example":"[BUILD_ID]"},"in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","tags":["functions"],"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).","responses":{"200":{"description":"Executions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/executionList"}}}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"}]},"post":{"summary":"Create Execution","operationId":"functionsCreateExecution","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.","responses":{"201":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","x-example":false}}}}}}}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/execution"}}}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"schema":{"type":"string","x-example":"[FUNCTION_ID]"},"in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"schema":{"type":"string","x-example":"[EXECUTION_ID]"},"in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthAntivirus"}}}}},"x-appwrite":{"method":"getAntivirus","weight":132,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getCache","weight":125,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getDB","weight":124,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueCertificates","weight":129,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueFunctions","weight":130,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueLogs","weight":128,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthQueue"}}}}},"x-appwrite":{"method":"getQueueWebhooks","weight":127,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthStatus"}}}}},"x-appwrite":{"method":"getStorageLocal","weight":131,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","tags":["health"],"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.","responses":{"200":{"description":"Health Time","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/healthTime"}}}}},"x-appwrite":{"method":"getTime","weight":126,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","tags":["locale"],"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))","responses":{"200":{"description":"Locale","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/locale"}}}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/continentList"}}}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/countryList"}}}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/phoneList"}}}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/currencyList"}}}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/languageList"}}}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucketList"}}}}},"x-appwrite":{"method":"listBuckets","weight":166,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"createBucket","weight":165,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"bucketId":{"type":"string","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.","x-example":"[BUCKET_ID]"},"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["bucketId","name","permission"]}}}}}},"\/storage\/buckets\/{bucketId}":{"get":{"summary":"Get Bucket","operationId":"storageGetBucket","tags":["storage"],"description":"Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"getBucket","weight":167,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/bucket"}}}}},"x-appwrite":{"method":"updateBucket","weight":168,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Bucket name","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.","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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}},"enabled":{"type":"boolean","description":"Is bucket enabled?","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)","x-example":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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","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","x-example":false}},"required":["name","permission"]}}}}},"delete":{"summary":"Delete Bucket","operationId":"storageDeleteBucket","tags":["storage"],"description":"Delete a storage bucket by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":169,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","tags":["storage"],"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).","responses":{"200":{"description":"Files List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/fileList"}}}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create File","operationId":"storageCreateFile","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","responses":{"201":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"}],"requestBody":{"content":{"multipart\/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string","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.","x-example":"[FILE_ID]","x-upload-id":true},"file":{"type":"string","description":"Binary file.","x-example":null},"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}},"required":["fileId","file"]}}}}}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}":{"get":{"summary":"Get File","operationId":"storageGetFile","tags":["storage"],"description":"Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]},"put":{"summary":"Update File","operationId":"storageUpdateFile","tags":["storage"],"description":"Update a file by its unique ID. Only users with write permissions have access to update this resource.","responses":{"200":{"description":"File","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/file"}}}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File unique ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"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.","x-example":null,"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.","x-example":null,"items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete File","operationId":"storageDeleteFile","tags":["storage"],"description":"Delete a file by its unique ID. Only users with write permissions have access to delete this resource.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","tags":["storage"],"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.","responses":{"200":{"description":"Image"}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"},{"name":"width","description":"Resize preview image width, Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"borderRadius","description":"Preview image border radius in pixels. Pass an integer between 0 to 4000.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","default":""},"in":"query"},{"name":"output","description":"Output format type (jpeg, jpg, png, gif and webp).","required":false,"schema":{"type":"string","x-example":"jpg","default":""},"in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","tags":["storage"],"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.","responses":{"200":{"description":"File"}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](\/docs\/server\/storage#createBucket).","required":true,"schema":{"type":"string","x-example":"[BUCKET_ID]"},"in":"path"},{"name":"fileId","description":"File ID.","required":true,"schema":{"type":"string","x-example":"[FILE_ID]"},"in":"path"}]}},"\/teams":{"get":{"summary":"List Teams","operationId":"teamsList","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).","responses":{"200":{"description":"Teams List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/teamList"}}}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team","operationId":"teamsCreate","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.","responses":{"201":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string","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.","x-example":"[TEAM_ID]"},"name":{"type":"string","description":"Team name. Max length: 128 chars.","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["teamId","name"]}}}}}},"\/teams\/{teamId}":{"get":{"summary":"Get Team","operationId":"teamsGet","tags":["teams"],"description":"Get a team by its ID. All team members have read access for this resource.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/team"}}}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}},"delete":{"summary":"Delete Team","operationId":"teamsDelete","tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create Team Membership","operationId":"teamsCreateMembership","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.","responses":{"201":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","x-example":"https:\/\/example.com"},"name":{"type":"string","description":"Name of the new team member. Max length: 128 chars.","x-example":"[NAME]"}},"required":["email","roles","url"]}}}}}},"\/teams\/{teamId}\/memberships\/{membershipId}":{"get":{"summary":"Get Team Membership","operationId":"teamsGetMembership","tags":["teams"],"description":"Get a team member by the membership unique id. All team members have read access for this resource.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","tags":["teams"],"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).","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","x-example":null,"items":{"type":"string"}}},"required":["roles"]}}}}},"delete":{"summary":"Delete Team Membership","operationId":"teamsDeleteMembership","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","tags":["teams"],"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","responses":{"200":{"description":"Membership","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membership"}}}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"schema":{"type":"string","x-example":"[TEAM_ID]"},"in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"schema":{"type":"string","x-example":"[MEMBERSHIP_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","x-example":"[SECRET]"}},"required":["userId","secret"]}}}}}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/userList"}}}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"search","description":"Search term to filter your list results. Max length: 256 chars.","required":false,"schema":{"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,"schema":{"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,"schema":{"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,"schema":{"type":"string","x-example":"[CURSOR]","default":""},"in":"query"},{"name":"cursorDirection","description":"Direction of the cursor.","required":false,"schema":{"type":"string","x-example":"after","default":"after"},"in":"query"},{"name":"orderType","description":"Order result by ASC or DESC order.","required":false,"schema":{"type":"string","x-example":"ASC","default":"ASC"},"in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","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.","x-example":"[USER_ID]"},"email":{"type":"string","description":"User email.","x-example":"email@example.com"},"password":{"type":"string","description":"User password. Must be at least 8 chars.","x-example":"password"},"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["userId","email","password"]}}}}}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"get","weight":194,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":209,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmail","weight":204,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","x-example":"email@example.com"}},"required":["email"]}}}}}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/logList"}}}}},"x-appwrite":{"method":"getLogs","weight":198,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"limit","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,"schema":{"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,"schema":{"type":"integer","format":"int32","x-example":0,"default":0},"in":"query"}]}},"\/users\/{userId}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/membershipList"}}}}},"x-appwrite":{"method":"getMemberships","weight":197,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/name":{"patch":{"summary":"Update Name","operationId":"usersUpdateName","tags":["users"],"description":"Update the user name by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateName","weight":202,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","x-example":"[NAME]"}},"required":["name"]}}}}}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePassword","weight":203,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","x-example":"password"}},"required":["password"]}}}}}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhone","weight":205,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","x-example":null}},"required":["number"]}}}}}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"getPrefs","weight":195,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","tags":["users"],"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.","responses":{"200":{"description":"Preferences","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/preferences"}}}}},"x-appwrite":{"method":"updatePrefs","weight":206,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","x-example":"{}"}},"required":["prefs"]}}}}}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/sessionList"}}}}},"x-appwrite":{"method":"getSessions","weight":196,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":208,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":207,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"schema":{"type":"string","x-example":"[SESSION_ID]"},"in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateStatus","weight":199,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","x-example":false}},"required":["status"]}}}}}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updateEmailVerification","weight":200,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","x-example":false}},"required":["emailVerification"]}}}}}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/user"}}}}},"x-appwrite":{"method":"updatePhoneVerification","weight":201,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"schema":{"type":"string","x-example":"[USER_ID]"},"in":"path"}],"requestBody":{"content":{"application\/json":{"schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","x-example":false}},"required":["phoneVerification"]}}}}}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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."}],"components":{"schemas":{"error":{"description":"Error","type":"object","properties":{"message":{"type":"string","description":"Error message.","x-example":"Not found"},"code":{"type":"string","description":"Error code.","x-example":"404"},"type":{"type":"string","description":"Error type. You can learn more about all the error types at https:\/\/appwrite.io\/docs\/error-codes#errorTypes","x-example":"not_found"},"version":{"type":"string","description":"Server version number.","x-example":"1.0"}},"required":["message","code","type","version"]},"documentList":{"description":"Documents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of documents documents that matched your query.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"$ref":"#\/components\/schemas\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"$ref":"#\/components\/schemas\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"$ref":"#\/components\/schemas\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"$ref":"#\/components\/schemas\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"$ref":"#\/components\/schemas\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"$ref":"#\/components\/schemas\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"$ref":"#\/components\/schemas\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"$ref":"#\/components\/schemas\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"$ref":"#\/components\/schemas\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"$ref":"#\/components\/schemas\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"$ref":"#\/components\/schemas\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"$ref":"#\/components\/schemas\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"$ref":"#\/components\/schemas\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"$ref":"#\/components\/schemas\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"$ref":"#\/components\/schemas\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"$ref":"#\/components\/schemas\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"$ref":"#\/components\/schemas\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"$ref":"#\/components\/schemas\/phone"},"x-example":""}},"required":["total","phones"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"}},"required":["$id","name"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"$ref":"#\/components\/schemas\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","databaseId","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"anyOf":[{"$ref":"#\/components\/schemas\/attributeBoolean"},{"$ref":"#\/components\/schemas\/attributeInteger"},{"$ref":"#\/components\/schemas\/attributeFloat"},{"$ref":"#\/components\/schemas\/attributeEmail"},{"$ref":"#\/components\/schemas\/attributeEnum"},{"$ref":"#\/components\/schemas\/attributeUrl"},{"$ref":"#\/components\/schemas\/attributeIp"},{"$ref":"#\/components\/schemas\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"$ref":"#\/components\/schemas\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"securitySchemes":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header"},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-0.15.x-client.json b/app/config/specs/swagger2-0.15.x-client.json index b6121b45d..498ef456e 100644 --- a/app/config/specs/swagger2-0.15.x-client.json +++ b/app/config/specs/swagger2-0.15.x-client.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":39,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":50,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":49,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":40,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":45,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":41,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":47,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null}},"required":["userId","number"]}}]},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"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).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","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.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}}},"tags":[{"name":"account","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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":40,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":51,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":50,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":41,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":47,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":42,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null}},"required":["userId","number"]}}]},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":49,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-0.15.x-console.json b/app/config/specs/swagger2-0.15.x-console.json index a94067609..37ab158d6 100644 --- a/app/config/specs/swagger2-0.15.x-console.json +++ b/app/config/specs/swagger2-0.15.x-console.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":39,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":50,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":49,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":40,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":45,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":41,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":47,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null}},"required":["userId","number"]}}]},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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).","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":79,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":78,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","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":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [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.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":80,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":84,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":85,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":94,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":93,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":87,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":88,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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. Maximum of 100 elements are allowed, each 1024 characters long.","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":92,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":91,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":89,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":90,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":95,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":96,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"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).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","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.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databaseListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listDocumentLogs","weight":104,"cookies":false,"type":"","demo":"database\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","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"},{"name":"limit","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"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":98,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":97,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":99,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":100,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databaseListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listCollectionLogs","weight":83,"cookies":false,"type":"","demo":"database\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"limit","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"}]}},"\/database\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databaseGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getUsage","weight":81,"cookies":false,"type":"","demo":"database\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/database\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databaseGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"database\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","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.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":204,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":203,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":205,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":206,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":208,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":210,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":212,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_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 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.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":211,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"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.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":213,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":209,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":214,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","weight":207,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":114,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":124,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":117,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":116,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":121,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":122,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":120,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":119,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":123,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"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.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":118,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","weight":127,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"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":"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. [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 project used as the starting point for the query, excluding the project 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 Project","operationId":"projectsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","weight":126,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"projectId":{"type":"string","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":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","default":null,"x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}]}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","weight":128,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","weight":130,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":135,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","weight":133,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","default":null,"x-example":0}},"required":["limit"]}}]}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","weight":134,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","default":null,"x-example":false}},"required":["status"]}}]}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","schema":{"$ref":"#\/definitions\/domainList"}}},"x-appwrite":{"method":"listDomains","weight":153,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"createDomain","weight":152,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","default":null,"x-example":null}},"required":["domain"]}}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"getDomain","weight":154,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":156,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"updateDomainVerification","weight":155,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","weight":143,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","weight":142,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","default":0,"x-example":null}},"required":["name","scopes"]}}]}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","weight":144,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","weight":145,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","default":0,"x-example":null}},"required":["name","scopes"]}}]},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":146,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","weight":132,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","default":null,"x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","default":"","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":"","x-example":"[SECRET]"}},"required":["provider"]}}]}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","weight":148,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","weight":147,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","default":null,"x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","default":"","x-example":null}},"required":["type","name"]}}]}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","weight":149,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","weight":150,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":null}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":151,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","weight":131,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","default":null,"x-example":"account"},"status":{"type":"boolean","description":"Service status.","default":null,"x-example":false}},"required":["service","status"]}}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":129,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","weight":137,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","weight":136,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","weight":138,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","weight":139,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":141,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":140,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":158,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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":"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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":157,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":159,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":160,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":161,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","weight":170,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","weight":171,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":183,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"limit","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"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":185,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":184,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","weight":202,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"provider","description":"Provider Name.","required":false,"type":"string","x-example":"email","default":"","in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":186,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":201,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":196,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":190,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","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}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":189,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":194,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":195,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":197,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":null}},"required":["number"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":187,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"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.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":198,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":188,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":200,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":199,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":191,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":192,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":193,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"type":"object","$ref":"#\/definitions\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":""}},"required":["total","metrics"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAuth0Appid":{"type":"string","description":"Auth0 OAuth app ID.","x-example":"123247283472834787438"},"providerAuth0Secret":{"type":"string","description":"Auth0 OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDailymotionAppid":{"type":"string","description":"Dailymotion OAuth app ID.","x-example":"123247283472834787438"},"providerDailymotionSecret":{"type":"string","description":"Dailymotion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerOktaAppid":{"type":"string","description":"Okta OAuth app ID.","x-example":"123247283472834787438"},"providerOktaSecret":{"type":"string","description":"Okta OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabase":{"type":"boolean","description":"Database service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerAuth0Appid","providerAuth0Secret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDailymotionAppid","providerDailymotionSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerOktaAppid","providerOktaSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerStripeAppid","providerStripeSecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerWordpressAppid","providerWordpressSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerZoomAppid","providerZoomSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabase","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Webhook creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Webhook update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Key creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Key update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"integer","description":"Key expiration in Unix timestamp.","x-example":"1653990687","format":"int32"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Domain creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Domain update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"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"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":40,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":51,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":50,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":41,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":47,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":42,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null}},"required":["userId","number"]}}]},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":49,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"list","weight":80,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":79,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-database.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","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":"[DATABASE_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","weight":112,"cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"get","weight":81,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"update","weight":83,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":84,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":86,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":85,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","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":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":87,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":89,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":90,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":99,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":98,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":92,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":93,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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. Maximum of 100 elements are allowed, each 1024 characters long.","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":97,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":96,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":94,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":91,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":95,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":100,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":101,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listDocumentLogs","weight":109,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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"},{"name":"limit","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":103,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":102,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":104,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]},"delete":{"summary":"Delete Index","operationId":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":105,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listCollectionLogs","weight":88,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"limit","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":114,"cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":82,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"limit","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"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","weight":113,"cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":212,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":211,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":213,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":214,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":216,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":218,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":220,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_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 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.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":219,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"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.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":221,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":217,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":222,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","weight":215,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":132,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":125,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":124,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":129,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":130,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":128,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":127,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":131,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"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.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":126,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","weight":135,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"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":"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. [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 project used as the starting point for the query, excluding the project 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 Project","operationId":"projectsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","weight":134,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"projectId":{"type":"string","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":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","default":null,"x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}]}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","weight":136,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","weight":138,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":143,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","weight":141,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","default":null,"x-example":0}},"required":["limit"]}}]}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","weight":142,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","default":null,"x-example":false}},"required":["status"]}}]}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","schema":{"$ref":"#\/definitions\/domainList"}}},"x-appwrite":{"method":"listDomains","weight":161,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"createDomain","weight":160,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","default":null,"x-example":null}},"required":["domain"]}}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"getDomain","weight":162,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":164,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"updateDomainVerification","weight":163,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","weight":151,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","weight":150,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","default":0,"x-example":null}},"required":["name","scopes"]}}]}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","weight":152,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","weight":153,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","default":0,"x-example":null}},"required":["name","scopes"]}}]},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":154,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","weight":140,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","default":null,"x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","default":"","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":"","x-example":"[SECRET]"}},"required":["provider"]}}]}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","weight":156,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","weight":155,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","default":null,"x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","default":"","x-example":null}},"required":["type","name"]}}]}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","weight":157,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","weight":158,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":null}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":159,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","weight":139,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","default":null,"x-example":"account"},"status":{"type":"boolean","description":"Service status.","default":null,"x-example":false}},"required":["service","status"]}}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":137,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","weight":145,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","weight":144,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","weight":146,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","weight":147,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":149,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":148,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":166,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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":"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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":165,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":167,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":168,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":169,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","weight":178,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","weight":179,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":191,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"limit","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"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","weight":210,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"provider","description":"Provider Name.","required":false,"type":"string","x-example":"email","default":"","in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":194,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":209,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":204,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":198,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","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}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":197,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":202,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":203,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":205,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":null}},"required":["number"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":195,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"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.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":206,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":196,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":208,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":207,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":199,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":200,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":201,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"type":"object","$ref":"#\/definitions\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":""}},"required":["total","metrics"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"}},"required":["$id","name"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","databaseId","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAuth0Appid":{"type":"string","description":"Auth0 OAuth app ID.","x-example":"123247283472834787438"},"providerAuth0Secret":{"type":"string","description":"Auth0 OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDailymotionAppid":{"type":"string","description":"Dailymotion OAuth app ID.","x-example":"123247283472834787438"},"providerDailymotionSecret":{"type":"string","description":"Dailymotion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerOktaAppid":{"type":"string","description":"Okta OAuth app ID.","x-example":"123247283472834787438"},"providerOktaSecret":{"type":"string","description":"Okta OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerAuth0Appid","providerAuth0Secret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDailymotionAppid","providerDailymotionSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerOktaAppid","providerOktaSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerStripeAppid","providerStripeSecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerWordpressAppid","providerWordpressSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerZoomAppid","providerZoomSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Webhook creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Webhook update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Key creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Key update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"integer","description":"Key expiration in Unix timestamp.","x-example":"1653990687","format":"int32"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Domain creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Domain update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-0.15.x-server.json b/app/config/specs/swagger2-0.15.x-server.json index f315aad90..d6bb2f6f9 100644 --- a/app/config/specs/swagger2-0.15.x-server.json +++ b/app/config/specs/swagger2-0.15.x-server.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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).","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":79,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":78,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","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":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [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.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":80,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":84,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":85,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":94,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":93,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":87,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":88,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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. Maximum of 100 elements are allowed, each 1024 characters long.","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":92,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":91,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":89,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":90,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":95,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":96,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"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).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","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.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":98,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":97,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":99,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":100,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":204,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":203,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":205,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":206,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":208,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":210,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":212,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_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 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.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":211,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"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.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":213,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":209,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":214,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":114,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":124,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":117,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":116,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":121,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":122,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":120,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":119,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":123,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"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.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":118,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":158,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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":"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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":157,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":159,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":160,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":161,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":185,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":184,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":186,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":201,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":196,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":190,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","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}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":189,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":194,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":195,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":197,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":null}},"required":["number"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":187,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"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.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":198,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":188,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":200,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":199,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":191,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":192,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":193,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"list","weight":80,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":79,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-database.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","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":"[DATABASE_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"get","weight":81,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"update","weight":83,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":84,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":86,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":85,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","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":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":87,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":89,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":90,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":99,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":98,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":92,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":93,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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. Maximum of 100 elements are allowed, each 1024 characters long.","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":97,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":96,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":94,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":91,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":95,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":100,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":101,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":103,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":102,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":104,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]},"delete":{"summary":"Delete Index","operationId":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":105,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":212,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":211,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":213,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":214,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":216,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":218,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":220,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_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 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.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":219,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"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.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":221,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":217,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":222,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":132,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":125,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":124,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":129,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":130,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":128,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":127,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":131,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"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.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":126,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":166,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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":"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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":165,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":167,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":168,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":169,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":194,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":209,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":204,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":198,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","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}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":197,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":202,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":203,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":205,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":null}},"required":["number"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":195,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"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.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":206,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":196,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":208,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":207,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":199,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":200,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":201,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"}},"required":["$id","name"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","databaseId","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index b6121b45d..498ef456e 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":39,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":50,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":49,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":40,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":45,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":41,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":47,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null}},"required":["userId","number"]}}]},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"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).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","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.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}}},"tags":[{"name":"account","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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":40,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":51,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":50,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":41,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":47,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":42,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null}},"required":["userId","number"]}}]},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":49,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index a94067609..37ab158d6 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":39,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":50,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":49,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":40,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":45,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":41,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":47,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null}},"required":["userId","number"]}}]},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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).","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":79,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":78,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","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":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [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.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":80,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":84,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":85,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":94,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":93,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":87,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":88,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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. Maximum of 100 elements are allowed, each 1024 characters long.","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":92,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":91,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":89,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":90,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":95,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":96,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"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).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","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.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databaseListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get the document activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listDocumentLogs","weight":104,"cookies":false,"type":"","demo":"database\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","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"},{"name":"limit","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"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":98,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":97,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":99,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":100,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databaseListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get the collection activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listCollectionLogs","weight":83,"cookies":false,"type":"","demo":"database\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"limit","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"}]}},"\/database\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databaseGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getUsage","weight":81,"cookies":false,"type":"","demo":"database\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/database\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databaseGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":82,"cookies":false,"type":"","demo":"database\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","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.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":204,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":203,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":205,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":206,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":208,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":210,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":212,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_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 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.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":211,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"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.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":213,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":209,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":214,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","weight":207,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":114,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":124,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":117,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":116,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":121,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":122,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":120,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":119,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":123,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"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.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":118,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","weight":127,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"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":"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. [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 project used as the starting point for the query, excluding the project 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 Project","operationId":"projectsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","weight":126,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"projectId":{"type":"string","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":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","default":null,"x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}]}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","weight":128,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","weight":130,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":135,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","weight":133,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","default":null,"x-example":0}},"required":["limit"]}}]}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","weight":134,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","default":null,"x-example":false}},"required":["status"]}}]}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","schema":{"$ref":"#\/definitions\/domainList"}}},"x-appwrite":{"method":"listDomains","weight":153,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"createDomain","weight":152,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","default":null,"x-example":null}},"required":["domain"]}}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"getDomain","weight":154,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":156,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"updateDomainVerification","weight":155,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","weight":143,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","weight":142,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","default":0,"x-example":null}},"required":["name","scopes"]}}]}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","weight":144,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","weight":145,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","default":0,"x-example":null}},"required":["name","scopes"]}}]},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":146,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","weight":132,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","default":null,"x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","default":"","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":"","x-example":"[SECRET]"}},"required":["provider"]}}]}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","weight":148,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","weight":147,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","default":null,"x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","default":"","x-example":null}},"required":["type","name"]}}]}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","weight":149,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","weight":150,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":null}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":151,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","weight":131,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","default":null,"x-example":"account"},"status":{"type":"boolean","description":"Service status.","default":null,"x-example":false}},"required":["service","status"]}}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":129,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","weight":137,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","weight":136,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","weight":138,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","weight":139,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":141,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":140,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":158,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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":"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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":157,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":159,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":160,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":161,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","weight":170,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","weight":171,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":183,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"limit","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"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":185,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":184,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","weight":202,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"provider","description":"Provider Name.","required":false,"type":"string","x-example":"email","default":"","in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":186,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":201,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":196,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":190,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","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}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":189,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":194,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":195,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":197,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":null}},"required":["number"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":187,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"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.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":198,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":188,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":200,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":199,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":191,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":192,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":193,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"type":"object","$ref":"#\/definitions\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":""}},"required":["total","metrics"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAuth0Appid":{"type":"string","description":"Auth0 OAuth app ID.","x-example":"123247283472834787438"},"providerAuth0Secret":{"type":"string","description":"Auth0 OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDailymotionAppid":{"type":"string","description":"Dailymotion OAuth app ID.","x-example":"123247283472834787438"},"providerDailymotionSecret":{"type":"string","description":"Dailymotion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerOktaAppid":{"type":"string","description":"Okta OAuth app ID.","x-example":"123247283472834787438"},"providerOktaSecret":{"type":"string","description":"Okta OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabase":{"type":"boolean","description":"Database service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerAuth0Appid","providerAuth0Secret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDailymotionAppid","providerDailymotionSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerOktaAppid","providerOktaSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerStripeAppid","providerStripeSecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerWordpressAppid","providerWordpressSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerZoomAppid","providerZoomSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabase","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Webhook creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Webhook update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Key creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Key update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"integer","description":"Key expiration in Unix timestamp.","x-example":"1653990687","format":"int32"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Domain creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Domain update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"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"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}},"Mode":{"type":"apiKey","name":"X-Appwrite-Mode","description":"","in":"header","x-appwrite":{"demo":""}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"post":{"summary":"Create Account","operationId":"accountCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register a new account in your project. After the user registration completes successfully, you can use the [\/account\/verfication](\/docs\/client\/account#accountCreateVerification) route to start verifying the user email address. To allow the new user to login to their new account, you need to create a new [account session](\/docs\/client\/account#accountCreateSession).","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":40,"cookies":false,"type":"","demo":"account\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/jwt":{"post":{"summary":"Create Account JWT","operationId":"accountCreateJWT","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.","responses":{"201":{"description":"JWT","schema":{"$ref":"#\/definitions\/jwt"}}},"x-appwrite":{"method":"createJWT","weight":51,"cookies":false,"type":"","demo":"account\/create-j-w-t.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-jwt.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/anonymous":{"post":{"summary":"Create Anonymous Session","operationId":"accountCreateAnonymousSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to allow a new user to register an anonymous account in your project. This route will also create a new session for the user. To allow the new user to convert an anonymous account to a normal account, you need to update its [email and password](\/docs\/client\/account#accountUpdateEmail) or create an [OAuth2 session](\/docs\/client\/account#accountCreateOAuth2Session).","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createAnonymousSession","weight":50,"cookies":false,"type":"","demo":"account\/create-anonymous-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-anonymous.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}]}},"\/account\/sessions\/email":{"post":{"summary":"Create Account Session with Email","operationId":"accountCreateEmailSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.","responses":{"201":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"createEmailSession","weight":41,"cookies":false,"type":"","demo":"account\/create-email-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-email.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"required":["email","password"]}}]}},"\/account\/sessions\/magic-url":{"post":{"summary":"Create Magic URL session","operationId":"accountCreateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user an email with a secret key for creating a session. When the user clicks the link in the email, the user is redirected back to the URL you provided with the secret key and userId values attached to the URL query string. Use the query string parameters to submit a request to the [PUT \/account\/sessions\/magic-url](\/docs\/client\/account#accountUpdateMagicURLSession) endpoint to complete the login process. The link sent to the user's email address is valid for 1 hour. If you are on a mobile device you can leave the URL parameter empty, so that the login completion will be handled by your Appwrite instance by default.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createMagicURLSession","weight":46,"cookies":false,"type":"","demo":"account\/create-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","description":"URL to redirect the user back to your app from the magic URL login. 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":"","x-example":"https:\/\/example.com"}},"required":["userId","email"]}}]},"put":{"summary":"Create Magic URL session (confirmation)","operationId":"accountUpdateMagicURLSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateMagicURLSession","weight":47,"cookies":false,"type":"","demo":"account\/update-magic-u-r-l-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-magic-url-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/oauth2\/{provider}":{"get":{"summary":"Create Account Session with OAuth2","operationId":"accountCreateOAuth2Session","consumes":["application\/json"],"produces":["text\/html"],"tags":["account"],"description":"Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.\n\nIf there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user..\n","responses":{"301":{"description":"No content"}},"x-appwrite":{"method":"createOAuth2Session","weight":42,"cookies":false,"type":"webAuth","demo":"account\/create-o-auth2session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-session-oauth2.md","rate-limit":50,"rate-time":3600,"rate-key":"ip:{ip}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"provider","description":"OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, bitbucket, bitly, box, dailymotion, discord, dropbox, facebook, github, gitlab, google, linkedin, microsoft, notion, okta, paypal, paypalSandbox, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoom.","required":true,"type":"string","x-example":"amazon","in":"path"},{"name":"success","description":"URL to redirect back to your app after a successful login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"failure","description":"URL to redirect back to your app after a failed login attempt. 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.","required":false,"type":"string","format":"url","x-example":"https:\/\/example.com","default":"","in":"query"},{"name":"scopes","description":"A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 128 characters long.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]}},"\/account\/sessions\/phone":{"post":{"summary":"Create Phone session","operationId":"accountCreatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Sends the user a SMS with a secret key for creating a session. Use the returned user ID and the secret to submit a request to the [PUT \/account\/sessions\/phone](\/docs\/client\/account#accountUpdatePhoneSession) endpoint to complete the login process. The secret sent to the user's phone is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneSession","weight":48,"cookies":false,"type":"","demo":"account\/create-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},email:{param-email}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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":"[USER_ID]"},"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null}},"required":["userId","number"]}}]},"put":{"summary":"Create Phone session (confirmation)","operationId":"accountUpdatePhoneSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete creating the session with the Magic URL. 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\/sessions\/magic-url](\/docs\/client\/account#accountCreateMagicURLSession) 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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updatePhoneSession","weight":49,"cookies":false,"type":"","demo":"account\/update-phone-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"list","weight":80,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":79,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-database.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","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":"[DATABASE_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabases","schema":{"$ref":"#\/definitions\/usageDatabases"}}},"x-appwrite":{"method":"getUsage","weight":112,"cookies":false,"type":"","demo":"databases\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"get","weight":81,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"update","weight":83,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":84,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":86,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":85,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","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":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":87,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":89,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":90,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":99,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":98,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":92,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":93,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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. Maximum of 100 elements are allowed, each 1024 characters long.","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":97,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":96,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":94,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":91,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":95,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":100,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":101,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}\/logs":{"get":{"summary":"List Document Logs","operationId":"databasesListDocumentLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listDocumentLogs","weight":109,"cookies":false,"type":"","demo":"databases\/list-document-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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"},{"name":"limit","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":103,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":102,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":104,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]},"delete":{"summary":"Delete Index","operationId":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":105,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListCollectionLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listCollectionLogs","weight":88,"cookies":false,"type":"","demo":"databases\/list-collection-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"limit","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/usage":{"get":{"summary":"Get usage stats for a collection","operationId":"databasesGetCollectionUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageCollection","schema":{"$ref":"#\/definitions\/usageCollection"}}},"x-appwrite":{"method":"getCollectionUsage","weight":114,"cookies":false,"type":"","demo":"databases\/get-collection-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/logs":{"get":{"summary":"List Collection Logs","operationId":"databasesListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":82,"cookies":false,"type":"","demo":"databases\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"limit","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"}]}},"\/databases\/{databaseId}\/usage":{"get":{"summary":"Get usage stats for the database","operationId":"databasesGetDatabaseUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"UsageDatabase","schema":{"$ref":"#\/definitions\/usageDatabase"}}},"x-appwrite":{"method":"getDatabaseUsage","weight":113,"cookies":false,"type":"","demo":"databases\/get-database-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"range","description":"`Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":212,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":211,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":213,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":214,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":216,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":218,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":220,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_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 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.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":219,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"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.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":221,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":217,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":222,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/usage":{"get":{"summary":"Get Function Usage","operationId":"functionsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"","responses":{"200":{"description":"UsageFunctions","schema":{"$ref":"#\/definitions\/usageFunctions"}}},"x-appwrite":{"method":"getUsage","weight":215,"cookies":false,"type":"","demo":"functions\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":132,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":125,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":124,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":129,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":130,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":128,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":127,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":131,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"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.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":126,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/projects":{"get":{"summary":"List Projects","operationId":"projectsList","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Projects List","schema":{"$ref":"#\/definitions\/projectList"}}},"x-appwrite":{"method":"list","weight":135,"cookies":false,"type":"","demo":"projects\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"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":"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. [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 project used as the starting point for the query, excluding the project 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 Project","operationId":"projectsCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"create","weight":134,"cookies":false,"type":"","demo":"projects\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"projectId":{"type":"string","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":"[PROJECT_ID]"},"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"teamId":{"type":"string","description":"Team unique ID.","default":null,"x-example":"[TEAM_ID]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal Name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal Country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal State. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal City. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal Address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal Tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["projectId","name","teamId"]}}]}},"\/projects\/{projectId}":{"get":{"summary":"Get Project","operationId":"projectsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"get","weight":136,"cookies":false,"type":"","demo":"projects\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"patch":{"summary":"Update Project","operationId":"projectsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"update","weight":138,"cookies":false,"type":"","demo":"projects\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Project name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"description":{"type":"string","description":"Project description. Max length: 256 chars.","default":"","x-example":"[DESCRIPTION]"},"logo":{"type":"string","description":"Project logo.","default":"","x-example":"[LOGO]"},"url":{"type":"string","description":"Project URL.","default":"","x-example":"https:\/\/example.com"},"legalName":{"type":"string","description":"Project legal name. Max length: 256 chars.","default":"","x-example":"[LEGAL_NAME]"},"legalCountry":{"type":"string","description":"Project legal country. Max length: 256 chars.","default":"","x-example":"[LEGAL_COUNTRY]"},"legalState":{"type":"string","description":"Project legal state. Max length: 256 chars.","default":"","x-example":"[LEGAL_STATE]"},"legalCity":{"type":"string","description":"Project legal city. Max length: 256 chars.","default":"","x-example":"[LEGAL_CITY]"},"legalAddress":{"type":"string","description":"Project legal address. Max length: 256 chars.","default":"","x-example":"[LEGAL_ADDRESS]"},"legalTaxId":{"type":"string","description":"Project legal tax ID. Max length: 256 chars.","default":"","x-example":"[LEGAL_TAX_ID]"}},"required":["name"]}}]},"delete":{"summary":"Delete Project","operationId":"projectsDelete","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":143,"cookies":false,"type":"","demo":"projects\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"Your user password for confirmation. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/projects\/{projectId}\/auth\/limit":{"patch":{"summary":"Update Project users limit","operationId":"projectsUpdateAuthLimit","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthLimit","weight":141,"cookies":false,"type":"","demo":"projects\/update-auth-limit.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"limit":{"type":"integer","description":"Set the max number of users allowed in this project. Use 0 for unlimited.","default":null,"x-example":0}},"required":["limit"]}}]}},"\/projects\/{projectId}\/auth\/{method}":{"patch":{"summary":"Update Project auth method status. Use this endpoint to enable or disable a given auth method for this project.","operationId":"projectsUpdateAuthStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateAuthStatus","weight":142,"cookies":false,"type":"","demo":"projects\/update-auth-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"method","description":"Auth Method. Possible values: email-password,magic-url,anonymous,invites,jwt,phone","required":true,"type":"string","x-example":"email-password","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Set the status of this auth method.","default":null,"x-example":false}},"required":["status"]}}]}},"\/projects\/{projectId}\/domains":{"get":{"summary":"List Domains","operationId":"projectsListDomains","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domains List","schema":{"$ref":"#\/definitions\/domainList"}}},"x-appwrite":{"method":"listDomains","weight":161,"cookies":false,"type":"","demo":"projects\/list-domains.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Domain","operationId":"projectsCreateDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"createDomain","weight":160,"cookies":false,"type":"","demo":"projects\/create-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name.","default":null,"x-example":null}},"required":["domain"]}}]}},"\/projects\/{projectId}\/domains\/{domainId}":{"get":{"summary":"Get Domain","operationId":"projectsGetDomain","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"getDomain","weight":162,"cookies":false,"type":"","demo":"projects\/get-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]},"delete":{"summary":"Delete Domain","operationId":"projectsDeleteDomain","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDomain","weight":164,"cookies":false,"type":"","demo":"projects\/delete-domain.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/domains\/{domainId}\/verification":{"patch":{"summary":"Update Domain Verification Status","operationId":"projectsUpdateDomainVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Domain","schema":{"$ref":"#\/definitions\/domain"}}},"x-appwrite":{"method":"updateDomainVerification","weight":163,"cookies":false,"type":"","demo":"projects\/update-domain-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"domainId","description":"Domain unique ID.","required":true,"type":"string","x-example":"[DOMAIN_ID]","in":"path"}]}},"\/projects\/{projectId}\/keys":{"get":{"summary":"List Keys","operationId":"projectsListKeys","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"API Keys List","schema":{"$ref":"#\/definitions\/keyList"}}},"x-appwrite":{"method":"listKeys","weight":151,"cookies":false,"type":"","demo":"projects\/list-keys.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Key","operationId":"projectsCreateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"createKey","weight":150,"cookies":false,"type":"","demo":"projects\/create-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 scopes are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","default":0,"x-example":null}},"required":["name","scopes"]}}]}},"\/projects\/{projectId}\/keys\/{keyId}":{"get":{"summary":"Get Key","operationId":"projectsGetKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"getKey","weight":152,"cookies":false,"type":"","demo":"projects\/get-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]},"put":{"summary":"Update Key","operationId":"projectsUpdateKey","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Key","schema":{"$ref":"#\/definitions\/key"}}},"x-appwrite":{"method":"updateKey","weight":153,"cookies":false,"type":"","demo":"projects\/update-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Key name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"scopes":{"type":"array","description":"Key scopes list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"expire":{"type":"integer","description":"Key expiration time in Unix timestamp. Use 0 for unlimited expiration.","default":0,"x-example":null}},"required":["name","scopes"]}}]},"delete":{"summary":"Delete Key","operationId":"projectsDeleteKey","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteKey","weight":154,"cookies":false,"type":"","demo":"projects\/delete-key.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"keyId","description":"Key unique ID.","required":true,"type":"string","x-example":"[KEY_ID]","in":"path"}]}},"\/projects\/{projectId}\/oauth2":{"patch":{"summary":"Update Project OAuth2","operationId":"projectsUpdateOAuth2","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateOAuth2","weight":140,"cookies":false,"type":"","demo":"projects\/update-o-auth2.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"provider":{"type":"string","description":"Provider Name","default":null,"x-example":"amazon"},"appId":{"type":"string","description":"Provider app ID. Max length: 256 chars.","default":"","x-example":"[APP_ID]"},"secret":{"type":"string","description":"Provider secret key. Max length: 512 chars.","default":"","x-example":"[SECRET]"}},"required":["provider"]}}]}},"\/projects\/{projectId}\/platforms":{"get":{"summary":"List Platforms","operationId":"projectsListPlatforms","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platforms List","schema":{"$ref":"#\/definitions\/platformList"}}},"x-appwrite":{"method":"listPlatforms","weight":156,"cookies":false,"type":"","demo":"projects\/list-platforms.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Platform","operationId":"projectsCreatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"createPlatform","weight":155,"cookies":false,"type":"","demo":"projects\/create-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"type":{"type":"string","description":"Platform type.","default":null,"x-example":"web"},"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client hostname. Max length: 256 chars.","default":"","x-example":null}},"required":["type","name"]}}]}},"\/projects\/{projectId}\/platforms\/{platformId}":{"get":{"summary":"Get Platform","operationId":"projectsGetPlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"getPlatform","weight":157,"cookies":false,"type":"","demo":"projects\/get-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]},"put":{"summary":"Update Platform","operationId":"projectsUpdatePlatform","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Platform","schema":{"$ref":"#\/definitions\/platform"}}},"x-appwrite":{"method":"updatePlatform","weight":158,"cookies":false,"type":"","demo":"projects\/update-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Platform name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"key":{"type":"string","description":"Package name for android or bundle ID for iOS. Max length: 256 chars.","default":"","x-example":"[KEY]"},"store":{"type":"string","description":"App store or Google Play store ID. Max length: 256 chars.","default":"","x-example":"[STORE]"},"hostname":{"type":"string","description":"Platform client URL. Max length: 256 chars.","default":"","x-example":null}},"required":["name"]}}]},"delete":{"summary":"Delete Platform","operationId":"projectsDeletePlatform","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deletePlatform","weight":159,"cookies":false,"type":"","demo":"projects\/delete-platform.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"platformId","description":"Platform unique ID.","required":true,"type":"string","x-example":"[PLATFORM_ID]","in":"path"}]}},"\/projects\/{projectId}\/service":{"patch":{"summary":"Update service status","operationId":"projectsUpdateServiceStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Project","schema":{"$ref":"#\/definitions\/project"}}},"x-appwrite":{"method":"updateServiceStatus","weight":139,"cookies":false,"type":"","demo":"projects\/update-service-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"service":{"type":"string","description":"Service name.","default":null,"x-example":"account"},"status":{"type":"boolean","description":"Service status.","default":null,"x-example":false}},"required":["service","status"]}}]}},"\/projects\/{projectId}\/usage":{"get":{"summary":"Get usage stats for a project","operationId":"projectsGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"UsageProject","schema":{"$ref":"#\/definitions\/usageProject"}}},"x-appwrite":{"method":"getUsage","weight":137,"cookies":false,"type":"","demo":"projects\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/projects\/{projectId}\/webhooks":{"get":{"summary":"List Webhooks","operationId":"projectsListWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhooks List","schema":{"$ref":"#\/definitions\/webhookList"}}},"x-appwrite":{"method":"listWebhooks","weight":145,"cookies":false,"type":"","demo":"projects\/list-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"}]},"post":{"summary":"Create Webhook","operationId":"projectsCreateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"201":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"createWebhook","weight":144,"cookies":false,"type":"","demo":"projects\/create-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}":{"get":{"summary":"Get Webhook","operationId":"projectsGetWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"getWebhook","weight":146,"cookies":false,"type":"","demo":"projects\/get-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]},"put":{"summary":"Update Webhook","operationId":"projectsUpdateWebhook","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhook","weight":147,"cookies":false,"type":"","demo":"projects\/update-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Webhook name. Max length: 128 chars.","default":null,"x-example":"[NAME]"},"events":{"type":"array","description":"Events list. Maximum of 100 events are allowed.","default":null,"x-example":null,"items":{"type":"string"}},"url":{"type":"string","description":"Webhook URL.","default":null,"x-example":"https:\/\/example.com"},"security":{"type":"boolean","description":"Certificate verification, false for disabled or true for enabled.","default":null,"x-example":false},"httpUser":{"type":"string","description":"Webhook HTTP user. Max length: 256 chars.","default":"","x-example":"[HTTP_USER]"},"httpPass":{"type":"string","description":"Webhook HTTP password. Max length: 256 chars.","default":"","x-example":"[HTTP_PASS]"}},"required":["name","events","url","security"]}}]},"delete":{"summary":"Delete Webhook","operationId":"projectsDeleteWebhook","consumes":["application\/json"],"produces":[],"tags":["projects"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteWebhook","weight":149,"cookies":false,"type":"","demo":"projects\/delete-webhook.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/projects\/{projectId}\/webhooks\/{webhookId}\/signature":{"patch":{"summary":"Update Webhook Signature Key","operationId":"projectsUpdateWebhookSignature","consumes":["application\/json"],"produces":["application\/json"],"tags":["projects"],"description":"","responses":{"200":{"description":"Webhook","schema":{"$ref":"#\/definitions\/webhook"}}},"x-appwrite":{"method":"updateWebhookSignature","weight":148,"cookies":false,"type":"","demo":"projects\/update-webhook-signature.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"projects.write","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"projectId","description":"Project unique ID.","required":true,"type":"string","x-example":"[PROJECT_ID]","in":"path"},{"name":"webhookId","description":"Webhook unique ID.","required":true,"type":"string","x-example":"[WEBHOOK_ID]","in":"path"}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":166,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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":"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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":165,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":167,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":168,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":169,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/usage":{"get":{"summary":"Get usage stats for storage","operationId":"storageGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"StorageUsage","schema":{"$ref":"#\/definitions\/usageStorage"}}},"x-appwrite":{"method":"getUsage","weight":178,"cookies":false,"type":"","demo":"storage\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/storage\/{bucketId}\/usage":{"get":{"summary":"Get usage stats for a storage bucket","operationId":"storageGetBucketUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"","responses":{"200":{"description":"UsageBuckets","schema":{"$ref":"#\/definitions\/usageBuckets"}}},"x-appwrite":{"method":"getBucketUsage","weight":179,"cookies":false,"type":"","demo":"storage\/get-bucket-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"bucketId","description":"Bucket ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"}]}},"\/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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/logs":{"get":{"summary":"List Team Logs","operationId":"teamsListLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Get the team activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"listLogs","weight":191,"cookies":false,"type":"","demo":"teams\/list-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"limit","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"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/usage":{"get":{"summary":"Get usage stats for the users API","operationId":"usersGetUsage","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"","responses":{"200":{"description":"UsageUsers","schema":{"$ref":"#\/definitions\/usageUsers"}}},"x-appwrite":{"method":"getUsage","weight":210,"cookies":false,"type":"","demo":"users\/get-usage.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["console"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[]}],"parameters":[{"name":"range","description":"Date range.","required":false,"type":"string","x-example":"24h","default":"30d","in":"query"},{"name":"provider","description":"Provider Name.","required":false,"type":"string","x-example":"email","default":"","in":"query"}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":194,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":209,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":204,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":198,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","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}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":197,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":202,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":203,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":205,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":null}},"required":["number"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":195,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"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.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":206,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":196,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":208,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":207,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":199,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":200,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":201,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"projectList":{"description":"Projects List","type":"object","properties":{"total":{"type":"integer","description":"Total number of projects documents that matched your query.","x-example":5,"format":"int32"},"projects":{"type":"array","description":"List of projects.","items":{"type":"object","$ref":"#\/definitions\/project"},"x-example":""}},"required":["total","projects"]},"webhookList":{"description":"Webhooks List","type":"object","properties":{"total":{"type":"integer","description":"Total number of webhooks documents that matched your query.","x-example":5,"format":"int32"},"webhooks":{"type":"array","description":"List of webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":""}},"required":["total","webhooks"]},"keyList":{"description":"API Keys List","type":"object","properties":{"total":{"type":"integer","description":"Total number of keys documents that matched your query.","x-example":5,"format":"int32"},"keys":{"type":"array","description":"List of keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":""}},"required":["total","keys"]},"platformList":{"description":"Platforms List","type":"object","properties":{"total":{"type":"integer","description":"Total number of platforms documents that matched your query.","x-example":5,"format":"int32"},"platforms":{"type":"array","description":"List of platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":""}},"required":["total","platforms"]},"domainList":{"description":"Domains List","type":"object","properties":{"total":{"type":"integer","description":"Total number of domains documents that matched your query.","x-example":5,"format":"int32"},"domains":{"type":"array","description":"List of domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":""}},"required":["total","domains"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"metricList":{"description":"Metric List","type":"object","properties":{"total":{"type":"integer","description":"Total number of metrics documents that matched your query.","x-example":5,"format":"int32"},"metrics":{"type":"array","description":"List of metrics.","items":{"type":"object","$ref":"#\/definitions\/metric"},"x-example":""}},"required":["total","metrics"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"}},"required":["$id","name"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","databaseId","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","userId","secret","expire"]},"jwt":{"description":"JWT","type":"object","properties":{"jwt":{"type":"string","description":"JWT encoded string.","x-example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}},"required":["jwt"]},"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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","stderr","time"]},"project":{"description":"Project","type":"object","properties":{"$id":{"type":"string","description":"Project ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Project name.","x-example":"New Project"},"description":{"type":"string","description":"Project description.","x-example":"This is a new project."},"teamId":{"type":"string","description":"Project team ID.","x-example":"1592981250"},"logo":{"type":"string","description":"Project logo file ID.","x-example":"5f5c451b403cb"},"url":{"type":"string","description":"Project website URL.","x-example":"5f5c451b403cb"},"legalName":{"type":"string","description":"Company legal name.","x-example":"Company LTD."},"legalCountry":{"type":"string","description":"Country code in [ISO 3166-1](http:\/\/en.wikipedia.org\/wiki\/ISO_3166-1) two-character format.","x-example":"US"},"legalState":{"type":"string","description":"State name.","x-example":"New York"},"legalCity":{"type":"string","description":"City name.","x-example":"New York City."},"legalAddress":{"type":"string","description":"Company Address.","x-example":"620 Eighth Avenue, New York, NY 10018"},"legalTaxId":{"type":"string","description":"Company Tax ID.","x-example":"131102020"},"authLimit":{"type":"integer","description":"Max users allowed. 0 is unlimited.","x-example":100,"format":"int32"},"platforms":{"type":"array","description":"List of Platforms.","items":{"type":"object","$ref":"#\/definitions\/platform"},"x-example":{}},"webhooks":{"type":"array","description":"List of Webhooks.","items":{"type":"object","$ref":"#\/definitions\/webhook"},"x-example":{}},"keys":{"type":"array","description":"List of API Keys.","items":{"type":"object","$ref":"#\/definitions\/key"},"x-example":{}},"domains":{"type":"array","description":"List of Domains.","items":{"type":"object","$ref":"#\/definitions\/domain"},"x-example":{}},"providerAmazonAppid":{"type":"string","description":"Amazon OAuth app ID.","x-example":"123247283472834787438"},"providerAmazonSecret":{"type":"string","description":"Amazon OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAppleAppid":{"type":"string","description":"Apple OAuth app ID.","x-example":"123247283472834787438"},"providerAppleSecret":{"type":"string","description":"Apple OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerAuth0Appid":{"type":"string","description":"Auth0 OAuth app ID.","x-example":"123247283472834787438"},"providerAuth0Secret":{"type":"string","description":"Auth0 OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitbucketAppid":{"type":"string","description":"BitBucket OAuth app ID.","x-example":"123247283472834787438"},"providerBitbucketSecret":{"type":"string","description":"BitBucket OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBitlyAppid":{"type":"string","description":"Bitly OAuth app ID.","x-example":"123247283472834787438"},"providerBitlySecret":{"type":"string","description":"Bitly OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerBoxAppid":{"type":"string","description":"Box OAuth app ID.","x-example":"123247283472834787438"},"providerBoxSecret":{"type":"string","description":"Box OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDailymotionAppid":{"type":"string","description":"Dailymotion OAuth app ID.","x-example":"123247283472834787438"},"providerDailymotionSecret":{"type":"string","description":"Dailymotion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDiscordAppid":{"type":"string","description":"Discord OAuth app ID.","x-example":"123247283472834787438"},"providerDiscordSecret":{"type":"string","description":"Discord OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerDropboxAppid":{"type":"string","description":"Dropbox OAuth app ID.","x-example":"123247283472834787438"},"providerDropboxSecret":{"type":"string","description":"Dropbox OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerFacebookAppid":{"type":"string","description":"Facebook OAuth app ID.","x-example":"123247283472834787438"},"providerFacebookSecret":{"type":"string","description":"Facebook OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGithubAppid":{"type":"string","description":"GitHub OAuth app ID.","x-example":"123247283472834787438"},"providerGithubSecret":{"type":"string","description":"GitHub OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGitlabAppid":{"type":"string","description":"GitLab OAuth app ID.","x-example":"123247283472834787438"},"providerGitlabSecret":{"type":"string","description":"GitLab OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerGoogleAppid":{"type":"string","description":"Google OAuth app ID.","x-example":"123247283472834787438"},"providerGoogleSecret":{"type":"string","description":"Google OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerLinkedinAppid":{"type":"string","description":"LinkedIn OAuth app ID.","x-example":"123247283472834787438"},"providerLinkedinSecret":{"type":"string","description":"LinkedIn OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMicrosoftAppid":{"type":"string","description":"Microsoft OAuth app ID.","x-example":"123247283472834787438"},"providerMicrosoftSecret":{"type":"string","description":"Microsoft OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerNotionAppid":{"type":"string","description":"Notion OAuth app ID.","x-example":"123247283472834787438"},"providerNotionSecret":{"type":"string","description":"Notion OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerOktaAppid":{"type":"string","description":"Okta OAuth app ID.","x-example":"123247283472834787438"},"providerOktaSecret":{"type":"string","description":"Okta OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerPaypalSandboxAppid":{"type":"string","description":"PayPal OAuth app ID.","x-example":"123247283472834787438"},"providerPaypalSandboxSecret":{"type":"string","description":"PayPal OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSalesforceAppid":{"type":"string","description":"Salesforce OAuth app ID.","x-example":"123247283472834787438"},"providerSalesforceSecret":{"type":"string","description":"Salesforce OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSlackAppid":{"type":"string","description":"Slack OAuth app ID.","x-example":"123247283472834787438"},"providerSlackSecret":{"type":"string","description":"Slack OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerSpotifyAppid":{"type":"string","description":"Spotify OAuth app ID.","x-example":"123247283472834787438"},"providerSpotifySecret":{"type":"string","description":"Spotify OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerStripeAppid":{"type":"string","description":"Stripe OAuth app ID.","x-example":"123247283472834787438"},"providerStripeSecret":{"type":"string","description":"Stripe OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTradeshiftBoxAppid":{"type":"string","description":"Tradeshift OAuth app ID.","x-example":"123247283472834787438"},"providerTradeshiftBoxSecret":{"type":"string","description":"Tradeshift OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerTwitchAppid":{"type":"string","description":"Twitch OAuth app ID.","x-example":"123247283472834787438"},"providerTwitchSecret":{"type":"string","description":"Twitch OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerWordpressAppid":{"type":"string","description":"WordPress OAuth app ID.","x-example":"123247283472834787438"},"providerWordpressSecret":{"type":"string","description":"WordPress OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYahooAppid":{"type":"string","description":"Yahoo OAuth app ID.","x-example":"123247283472834787438"},"providerYahooSecret":{"type":"string","description":"Yahoo OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYammerAppid":{"type":"string","description":"Yammer OAuth app ID.","x-example":"123247283472834787438"},"providerYammerSecret":{"type":"string","description":"Yammer OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerYandexAppid":{"type":"string","description":"Yandex OAuth app ID.","x-example":"123247283472834787438"},"providerYandexSecret":{"type":"string","description":"Yandex OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerZoomAppid":{"type":"string","description":"Zoom OAuth app ID.","x-example":"123247283472834787438"},"providerZoomSecret":{"type":"string","description":"Zoom OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"providerMockAppid":{"type":"string","description":"Mock OAuth app ID.","x-example":"123247283472834787438"},"providerMockSecret":{"type":"string","description":"Mock OAuth secret ID.","x-example":"djsgudsdsewe43434343dd34..."},"authEmailPassword":{"type":"boolean","description":"Email\/Password auth method status","x-example":true},"authUsersAuthMagicURL":{"type":"boolean","description":"Magic URL auth method status","x-example":true},"authAnonymous":{"type":"boolean","description":"Anonymous auth method status","x-example":true},"authInvites":{"type":"boolean","description":"Invites auth method status","x-example":true},"authJWT":{"type":"boolean","description":"JWT auth method status","x-example":true},"authPhone":{"type":"boolean","description":"Phone auth method status","x-example":true},"serviceStatusForAccount":{"type":"boolean","description":"Account service status","x-example":true},"serviceStatusForAvatars":{"type":"boolean","description":"Avatars service status","x-example":true},"serviceStatusForDatabases":{"type":"boolean","description":"Databases service status","x-example":true},"serviceStatusForLocale":{"type":"boolean","description":"Locale service status","x-example":true},"serviceStatusForHealth":{"type":"boolean","description":"Health service status","x-example":true},"serviceStatusForStorage":{"type":"boolean","description":"Storage service status","x-example":true},"serviceStatusForTeams":{"type":"boolean","description":"Teams service status","x-example":true},"serviceStatusForUsers":{"type":"boolean","description":"Users service status","x-example":true},"serviceStatusForFunctions":{"type":"boolean","description":"Functions service status","x-example":true}},"required":["$id","$createdAt","$updatedAt","name","description","teamId","logo","url","legalName","legalCountry","legalState","legalCity","legalAddress","legalTaxId","authLimit","platforms","webhooks","keys","domains","providerAmazonAppid","providerAmazonSecret","providerAppleAppid","providerAppleSecret","providerAuth0Appid","providerAuth0Secret","providerBitbucketAppid","providerBitbucketSecret","providerBitlyAppid","providerBitlySecret","providerBoxAppid","providerBoxSecret","providerDailymotionAppid","providerDailymotionSecret","providerDiscordAppid","providerDiscordSecret","providerDropboxAppid","providerDropboxSecret","providerFacebookAppid","providerFacebookSecret","providerGithubAppid","providerGithubSecret","providerGitlabAppid","providerGitlabSecret","providerGoogleAppid","providerGoogleSecret","providerLinkedinAppid","providerLinkedinSecret","providerMicrosoftAppid","providerMicrosoftSecret","providerNotionAppid","providerNotionSecret","providerOktaAppid","providerOktaSecret","providerPaypalAppid","providerPaypalSecret","providerPaypalSandboxAppid","providerPaypalSandboxSecret","providerSalesforceAppid","providerSalesforceSecret","providerSlackAppid","providerSlackSecret","providerSpotifyAppid","providerSpotifySecret","providerStripeAppid","providerStripeSecret","providerTradeshiftAppid","providerTradeshiftSecret","providerTradeshiftBoxAppid","providerTradeshiftBoxSecret","providerTwitchAppid","providerTwitchSecret","providerWordpressAppid","providerWordpressSecret","providerYahooAppid","providerYahooSecret","providerYammerAppid","providerYammerSecret","providerYandexAppid","providerYandexSecret","providerZoomAppid","providerZoomSecret","providerMockAppid","providerMockSecret","authEmailPassword","authUsersAuthMagicURL","authAnonymous","authInvites","authJWT","authPhone","serviceStatusForAccount","serviceStatusForAvatars","serviceStatusForDatabases","serviceStatusForLocale","serviceStatusForHealth","serviceStatusForStorage","serviceStatusForTeams","serviceStatusForUsers","serviceStatusForFunctions"]},"webhook":{"description":"Webhook","type":"object","properties":{"$id":{"type":"string","description":"Webhook ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Webhook creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Webhook update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Webhook name.","x-example":"My Webhook"},"url":{"type":"string","description":"Webhook URL endpoint.","x-example":"https:\/\/example.com\/webhook"},"events":{"type":"array","description":"Webhook trigger events.","items":{"type":"string"},"x-example":"database.collections.update"},"security":{"type":"boolean","description":"Indicated if SSL \/ TLS Certificate verification is enabled.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"},"signatureKey":{"type":"string","description":"Signature key which can be used to validated incoming","x-example":"ad3d581ca230e2b7059c545e5a"}},"required":["$id","$createdAt","$updatedAt","name","url","events","security","httpUser","httpPass","signatureKey"]},"key":{"description":"Key","type":"object","properties":{"$id":{"type":"string","description":"Key ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Key creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Key update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Key name.","x-example":"My API Key"},"expire":{"type":"integer","description":"Key expiration in Unix timestamp.","x-example":"1653990687","format":"int32"},"scopes":{"type":"array","description":"Allowed permission scopes.","items":{"type":"string"},"x-example":"users.read"},"secret":{"type":"string","description":"Secret key.","x-example":"919c2d18fb5d4...a2ae413da83346ad2"}},"required":["$id","$createdAt","$updatedAt","name","expire","scopes","secret"]},"domain":{"description":"Domain","type":"object","properties":{"$id":{"type":"string","description":"Domain ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Domain creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Domain update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"domain":{"type":"string","description":"Domain name.","x-example":"appwrite.company.com"},"registerable":{"type":"string","description":"Registerable domain name.","x-example":"company.com"},"tld":{"type":"string","description":"TLD name.","x-example":"com"},"verification":{"type":"boolean","description":"Verification process status.","x-example":true},"certificateId":{"type":"string","description":"Certificate ID.","x-example":"6ejea5c13377e"}},"required":["$id","$createdAt","$updatedAt","domain","registerable","tld","verification","certificateId"]},"platform":{"description":"Platform","type":"object","properties":{"$id":{"type":"string","description":"Platform ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Project creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Project update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Platform name.","x-example":"My Web App"},"type":{"type":"string","description":"Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.","x-example":"My Web App"},"key":{"type":"string","description":"Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.","x-example":"com.company.appname"},"store":{"type":"string","description":"App store or Google Play store ID.","x-example":""},"hostname":{"type":"string","description":"Web app hostname. Empty string for other platforms.","x-example":true},"httpUser":{"type":"string","description":"HTTP basic authentication username.","x-example":"username"},"httpPass":{"type":"string","description":"HTTP basic authentication password.","x-example":"password"}},"required":["$id","$createdAt","$updatedAt","name","type","key","store","hostname","httpUser","httpPass"]},"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"]},"usageDatabases":{"description":"UsageDatabases","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"databasesCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"databasesCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"databasesRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"databasesUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"databasesDelete":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","databasesCount","documentsCount","collectionsCount","databasesCreate","databasesRead","databasesUpdate","databasesDelete","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageDatabase":{"description":"UsageDatabase","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCount":{"type":"array","description":"Aggregated stats for total number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsCreate":{"type":"array","description":"Aggregated stats for collections created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsRead":{"type":"array","description":"Aggregated stats for collections read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsUpdate":{"type":"array","description":"Aggregated stats for collections updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collectionsDelete":{"type":"array","description":"Aggregated stats for collections delete.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","collectionsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete","collectionsCreate","collectionsRead","collectionsUpdate","collectionsDelete"]},"usageCollection":{"description":"UsageCollection","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"documentsCount":{"type":"array","description":"Aggregated stats for total number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsCreate":{"type":"array","description":"Aggregated stats for documents created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsRead":{"type":"array","description":"Aggregated stats for documents read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsUpdate":{"type":"array","description":"Aggregated stats for documents updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documentsDelete":{"type":"array","description":"Aggregated stats for documents deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","documentsCount","documentsCreate","documentsRead","documentsUpdate","documentsDelete"]},"usageUsers":{"description":"UsageUsers","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"usersCount":{"type":"array","description":"Aggregated stats for total number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersCreate":{"type":"array","description":"Aggregated stats for users created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersRead":{"type":"array","description":"Aggregated stats for users read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersUpdate":{"type":"array","description":"Aggregated stats for users updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"usersDelete":{"type":"array","description":"Aggregated stats for users deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsCreate":{"type":"array","description":"Aggregated stats for sessions created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsProviderCreate":{"type":"array","description":"Aggregated stats for sessions created for a provider ( email, anonymous or oauth2 ).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"sessionsDelete":{"type":"array","description":"Aggregated stats for sessions deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","usersCount","usersCreate","usersRead","usersUpdate","usersDelete","sessionsCreate","sessionsProviderCreate","sessionsDelete"]},"usageStorage":{"description":"StorageUsage","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by files (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"tagsStorage":{"type":"array","description":"Aggregated stats for the occupied storage size by tags (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCount":{"type":"array","description":"Aggregated stats for total number of files.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCount":{"type":"array","description":"Aggregated stats for total number of buckets.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsCreate":{"type":"array","description":"Aggregated stats for buckets created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsRead":{"type":"array","description":"Aggregated stats for buckets read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsUpdate":{"type":"array","description":"Aggregated stats for buckets updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"bucketsDelete":{"type":"array","description":"Aggregated stats for buckets deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesStorage","tagsStorage","filesCount","bucketsCount","bucketsCreate","bucketsRead","bucketsUpdate","bucketsDelete","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageBuckets":{"description":"UsageBuckets","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"filesCount":{"type":"array","description":"Aggregated stats for total number of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesStorage":{"type":"array","description":"Aggregated stats for total storage of files in this bucket.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesCreate":{"type":"array","description":"Aggregated stats for files created.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesRead":{"type":"array","description":"Aggregated stats for files read.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesUpdate":{"type":"array","description":"Aggregated stats for files updated.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"filesDelete":{"type":"array","description":"Aggregated stats for files deleted.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","filesCount","filesStorage","filesCreate","filesRead","filesUpdate","filesDelete"]},"usageFunctions":{"description":"UsageFunctions","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"functionsExecutions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsFailures":{"type":"array","description":"Aggregated stats for function execution failures.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functionsCompute":{"type":"array","description":"Aggregated stats for function execution duration.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","functionsExecutions","functionsFailures","functionsCompute"]},"usageProject":{"description":"UsageProject","type":"object","properties":{"range":{"type":"string","description":"The time range of the usage stats.","x-example":"30d"},"requests":{"type":"array","description":"Aggregated stats for number of requests.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"network":{"type":"array","description":"Aggregated stats for consumed bandwidth.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"functions":{"type":"array","description":"Aggregated stats for function executions.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"documents":{"type":"array","description":"Aggregated stats for number of documents.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"collections":{"type":"array","description":"Aggregated stats for number of collections.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"users":{"type":"array","description":"Aggregated stats for number of users.","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}},"storage":{"type":"array","description":"Aggregated stats for the occupied storage size (in bytes).","items":{"type":"object","$ref":"#\/definitions\/metricList"},"x-example":{}}},"required":["range","requests","network","functions","documents","collections","users","storage"]}},"externalDocs":{"description":"Full API docs, specs and tutorials","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index f315aad90..d6bb2f6f9 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":51,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":58,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":54,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":56,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":57,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":59,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":52,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":60,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":65,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":66,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":53,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":64,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":55,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":63,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":62,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":61,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":67,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":68,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":69,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":71,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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).","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":79,"cookies":false,"type":"","demo":"database\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databaseCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a new Collection.","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":78,"cookies":false,"type":"","demo":"database\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","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":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [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.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":80,"cookies":false,"type":"","demo":"database\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databaseUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Update a collection by its unique ID.","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":84,"cookies":false,"type":"","demo":"database\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":85,"cookies":false,"type":"","demo":"database\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/database\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databaseListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":94,"cookies":false,"type":"","demo":"database\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databaseCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a boolean attribute.\n","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":93,"cookies":false,"type":"","demo":"database\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databaseCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an email attribute.\n","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":87,"cookies":false,"type":"","demo":"database\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databaseCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":88,"cookies":false,"type":"","demo":"database\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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. Maximum of 100 elements are allowed, each 1024 characters long.","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databaseCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a float attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":92,"cookies":false,"type":"","demo":"database\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databaseCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create an integer attribute. Optionally, minimum and maximum values can be provided.\n","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":91,"cookies":false,"type":"","demo":"database\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databaseCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create IP address attribute.\n","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":89,"cookies":false,"type":"","demo":"database\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databaseCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a string attribute.\n","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":86,"cookies":false,"type":"","demo":"database\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databaseCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Create a URL attribute.\n","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":90,"cookies":false,"type":"","demo":"database\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/database\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databaseGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":95,"cookies":false,"type":"","demo":"database\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databaseDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":96,"cookies":false,"type":"","demo":"database\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/database\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databaseListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"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).","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":102,"cookies":false,"type":"","demo":"database\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","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.","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":101,"cookies":false,"type":"","demo":"database\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/database\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databaseGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"Get a document by its unique ID. This endpoint response returns a JSON object with the document data.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":103,"cookies":false,"type":"","demo":"database\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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.","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":105,"cookies":false,"type":"","demo":"database\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databaseDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"Delete a document by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":106,"cookies":false,"type":"","demo":"database\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"collectionId","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"}]}},"\/database\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databaseListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":98,"cookies":false,"type":"","demo":"database\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]},"post":{"summary":"Create Index","operationId":"databaseCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":97,"cookies":false,"type":"","demo":"database\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/database\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databaseGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["database"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":99,"cookies":false,"type":"","demo":"database\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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"}]},"delete":{"summary":"Delete Index","operationId":"databaseDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["database"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":100,"cookies":false,"type":"","demo":"database\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/database\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"collectionId","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.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":204,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":203,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":205,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":206,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":208,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":210,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":212,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_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 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.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":211,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"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.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":213,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":209,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":214,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":218,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":216,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":215,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":217,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":114,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":124,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":117,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":116,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":121,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":122,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":120,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":119,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":123,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"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.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":118,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":107,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":111,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":108,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":109,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":110,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":112,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":113,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":158,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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":"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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":157,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":159,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":160,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":161,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":163,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":162,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":164,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":168,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":169,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":166,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":165,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":167,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":173,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":172,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":174,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":175,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":176,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":178,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":177,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":179,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":180,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":182,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":181,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":185,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":184,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":186,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":201,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":196,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":190,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","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}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":189,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":194,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":195,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":197,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":null}},"required":["number"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":187,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"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.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":198,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":188,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":200,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":199,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":191,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":192,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":193,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file +{"swagger":"2.0","info":{"version":"0.15.0","title":"Appwrite","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)","termsOfService":"https:\/\/appwrite.io\/policy\/terms","contact":{"name":"Appwrite Team","url":"https:\/\/appwrite.io\/support","email":"team@appwrite.io"},"license":{"name":"BSD-3-Clause","url":"https:\/\/raw.githubusercontent.com\/appwrite\/appwrite\/master\/LICENSE"}},"host":"HOSTNAME","basePath":"\/v1","schemes":["https"],"consumes":["application\/json","multipart\/form-data"],"produces":["application\/json"],"securityDefinitions":{"Project":{"type":"apiKey","name":"X-Appwrite-Project","description":"Your project ID","in":"header","x-appwrite":{"demo":"5df5acd0d48c2"}},"Key":{"type":"apiKey","name":"X-Appwrite-Key","description":"Your secret API key","in":"header","x-appwrite":{"demo":"919c2d18fb5d4...a2ae413da83346ad2"}},"JWT":{"type":"apiKey","name":"X-Appwrite-JWT","description":"Your secret JSON Web Token","in":"header","x-appwrite":{"demo":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ..."}},"Locale":{"type":"apiKey","name":"X-Appwrite-Locale","description":"","in":"header","x-appwrite":{"demo":"en"}}},"paths":{"\/account":{"get":{"summary":"Get Account","operationId":"accountGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user data as JSON object.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":52,"cookies":false,"type":"","demo":"account\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/email":{"patch":{"summary":"Update Account Email","operationId":"accountUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":59,"cookies":false,"type":"","demo":"account\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"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"}},"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.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":55,"cookies":false,"type":"","demo":"account\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"limit","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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":57,"cookies":false,"type":"","demo":"account\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","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, Team Invites and Magic URL, oldPassword is optional.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":58,"cookies":false,"type":"","demo":"account\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"oldPassword":{"type":"string","description":"Current user password. Must be at least 8 chars.","default":"","x-example":"password"}},"required":["password"]}}]}},"\/account\/phone":{"patch":{"summary":"Update Account Phone","operationId":"accountUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":60,"cookies":false,"type":"","demo":"account\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.","default":null,"x-example":null},"password":{"type":"string","description":"User password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["number","password"]}}]}},"\/account\/prefs":{"get":{"summary":"Get Account Preferences","operationId":"accountGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user preferences as a key-value object.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":53,"cookies":false,"type":"","demo":"account\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"patch":{"summary":"Update Account Preferences","operationId":"accountUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePrefs","weight":61,"cookies":false,"type":"","demo":"account\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/account\/recovery":{"post":{"summary":"Create Password Recovery","operationId":"accountCreateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createRecovery","weight":66,"cookies":false,"type":"","demo":"account\/create-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":["url:{url},email:{param-email}","ip:{ip}"],"scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"},"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["email","url"]}}]},"put":{"summary":"Create Password Recovery (confirmation)","operationId":"accountUpdateRecovery","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateRecovery","weight":67,"cookies":false,"type":"","demo":"account\/update-recovery.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-recovery.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid reset token.","default":null,"x-example":"[SECRET]"},"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"},"passwordAgain":{"type":"string","description":"Repeat new user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["userId","secret","password","passwordAgain"]}}]}},"\/account\/sessions":{"get":{"summary":"Get Account Sessions","operationId":"accountGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Get currently logged in user list of active sessions across different devices.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":54,"cookies":false,"type":"","demo":"account\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"delete":{"summary":"Delete All Account Sessions","operationId":"accountDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["account"],"description":"Delete all sessions from the user account and remove any sessions cookies from the end client.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":65,"cookies":false,"type":"","demo":"account\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-sessions.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/account\/sessions\/{sessionId}":{"get":{"summary":"Get Session By ID","operationId":"accountGetSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"getSession","weight":56,"cookies":false,"type":"","demo":"account\/get-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to get the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]},"patch":{"summary":"Update Session (Refresh Tokens)","operationId":"accountUpdateSession","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to \"refresh\" the access token.","responses":{"200":{"description":"Session","schema":{"$ref":"#\/definitions\/session"}}},"x-appwrite":{"method":"updateSession","weight":64,"cookies":false,"type":"","demo":"account\/update-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-session.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","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","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":63,"cookies":false,"type":"","demo":"account\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/delete-session.md","rate-limit":100,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"sessionId","description":"Session ID. Use the string 'current' to delete the current device session.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/account\/status":{"patch":{"summary":"Update Account Status","operationId":"accountUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Block the currently logged in user account. Behind the scene, the user record is not deleted but permanently blocked from any access. To completely delete a user, use the Users API instead.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":62,"cookies":false,"type":"","demo":"account\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]}},"\/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#accountUpdateEmailVerification). 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","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createVerification","weight":68,"cookies":false,"type":"","demo":"account\/create-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"url":{"type":"string","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.","default":null,"x-example":"https:\/\/example.com"}},"required":["url"]}}]},"put":{"summary":"Create Email Verification (confirmation)","operationId":"accountUpdateVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"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.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updateVerification","weight":69,"cookies":false,"type":"","demo":"account\/update-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-email-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/account\/verification\/phone":{"post":{"summary":"Create Phone Verification","operationId":"accountCreatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should 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#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes.","responses":{"201":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"createPhoneVerification","weight":70,"cookies":false,"type":"","demo":"account\/create-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{userId}","scope":"account","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}]},"put":{"summary":"Create Phone Verification (confirmation)","operationId":"accountUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["account"],"description":"Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code.","responses":{"200":{"description":"Token","schema":{"$ref":"#\/definitions\/token"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":71,"cookies":false,"type":"","demo":"account\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-phone-verification.md","rate-limit":10,"rate-time":3600,"rate-key":"userId:{param-userId}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Valid verification token.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/avatars\/browsers\/{code}":{"get":{"summary":"Get Browser Icon","operationId":"avatarsGetBrowser","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"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 [GET \/account\/sessions](\/docs\/client\/account#accountGetSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getBrowser","weight":73,"cookies":false,"type":"location","demo":"avatars\/get-browser.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Browser Code.","required":true,"type":"string","x-example":"aa","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\/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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getCreditCard","weight":72,"cookies":false,"type":"location","demo":"avatars\/get-credit-card.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-credit-card.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","description":"Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro.","required":true,"type":"string","x-example":"amex","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\/favicon":{"get":{"summary":"Get Favicon","operationId":"avatarsGetFavicon","consumes":["application\/json"],"produces":["image\/*"],"tags":["avatars"],"description":"Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFavicon","weight":76,"cookies":false,"type":"location","demo":"avatars\/get-favicon.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-favicon.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFlag","weight":74,"cookies":false,"type":"location","demo":"avatars\/get-flag.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-flag.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"code","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getImage","weight":75,"cookies":false,"type":"location","demo":"avatars\/get-image.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-image.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"url","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. Defaults to 400.","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. Defaults to 400.","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.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getInitials","weight":78,"cookies":false,"type":"location","demo":"avatars\/get-initials.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-initials.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"name","description":"Full Name. When empty, current user name or email will be used. Max length: 128 chars.","required":false,"type":"string","x-example":"[NAME]","default":"","in":"query"},{"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":500,"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":500,"in":"query"},{"name":"color","description":"Changes text color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"},{"name":"background","description":"Changes background color. By default a random color will be picked and stay will persistent to the given name.","required":false,"type":"string","default":"","in":"query"}]}},"\/avatars\/qr":{"get":{"summary":"Get QR Code","operationId":"avatarsGetQR","consumes":["application\/json"],"produces":["image\/png"],"tags":["avatars"],"description":"Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getQR","weight":77,"cookies":false,"type":"location","demo":"avatars\/get-q-r.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-qr.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"avatars.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"text","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 1 to 1000. Defaults to 400.","required":false,"type":"integer","format":"int32","x-example":1,"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"}]}},"\/databases":{"get":{"summary":"List Databases","operationId":"databasesList","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"list","weight":80,"cookies":false,"type":"","demo":"databases\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Database","operationId":"databasesCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Database","schema":{"$ref":"#\/definitions\/database"}}},"x-appwrite":{"method":"create","weight":79,"cookies":false,"type":"","demo":"databases\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-database.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"databaseId":{"type":"string","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":"[DATABASE_ID]"},"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["databaseId","name"]}}]}},"\/databases\/{databaseId}":{"get":{"summary":"Get Database","operationId":"databasesGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"get","weight":81,"cookies":false,"type":"","demo":"databases\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]},"put":{"summary":"Update Database","operationId":"databasesUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"update","weight":83,"cookies":false,"type":"","demo":"databases\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"Collection name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Database","operationId":"databasesDelete","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":84,"cookies":false,"type":"","demo":"databases\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"databases.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections":{"get":{"summary":"List Collections","operationId":"databasesListCollections","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collections List","schema":{"$ref":"#\/definitions\/collectionList"}}},"x-appwrite":{"method":"listCollections","weight":86,"cookies":false,"type":"","demo":"databases\/list-collections.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-collections.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create Collection","operationId":"databasesCreateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"createCollection","weight":85,"cookies":false,"type":"","demo":"databases\/create-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"collectionId":{"type":"string","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":"Specifies the permissions model used in this collection, which accepts either 'collection' or 'document'. For 'collection' level permission, the permissions specified in read and write params are applied to all documents in the collection. For 'document' level permissions, read and write permissions are specified in each document. [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"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}":{"get":{"summary":"Get Collection","operationId":"databasesGetCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"getCollection","weight":87,"cookies":false,"type":"","demo":"databases\/get-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]},"put":{"summary":"Update Collection","operationId":"databasesUpdateCollection","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Collection","schema":{"$ref":"#\/definitions\/collection"}}},"x-appwrite":{"method":"updateCollection","weight":89,"cookies":false,"type":"","demo":"databases\/update-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":"databasesDeleteCollection","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteCollection","weight":90,"cookies":false,"type":"","demo":"databases\/delete-collection.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-collection.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","required":true,"type":"string","x-example":"[COLLECTION_ID]","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes":{"get":{"summary":"List Attributes","operationId":"databasesListAttributes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Attributes List","schema":{"$ref":"#\/definitions\/attributeList"}}},"x-appwrite":{"method":"listAttributes","weight":99,"cookies":false,"type":"","demo":"databases\/list-attributes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-attributes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/boolean":{"post":{"summary":"Create Boolean Attribute","operationId":"databasesCreateBooleanAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeBoolean","schema":{"$ref":"#\/definitions\/attributeBoolean"}}},"x-appwrite":{"method":"createBooleanAttribute","weight":98,"cookies":false,"type":"","demo":"databases\/create-boolean-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-boolean-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":false},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/email":{"post":{"summary":"Create Email Attribute","operationId":"databasesCreateEmailAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEmail","schema":{"$ref":"#\/definitions\/attributeEmail"}}},"x-appwrite":{"method":"createEmailAttribute","weight":92,"cookies":false,"type":"","demo":"databases\/create-email-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-email-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"email@example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/enum":{"post":{"summary":"Create Enum Attribute","operationId":"databasesCreateEnumAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeEnum","schema":{"$ref":"#\/definitions\/attributeEnum"}}},"x-appwrite":{"method":"createEnumAttribute","weight":93,"cookies":false,"type":"","demo":"databases\/create-enum-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-attribute-enum.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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. Maximum of 100 elements are allowed, each 1024 characters long.","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","elements","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/float":{"post":{"summary":"Create Float Attribute","operationId":"databasesCreateFloatAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeFloat","schema":{"$ref":"#\/definitions\/attributeFloat"}}},"x-appwrite":{"method":"createFloatAttribute","weight":97,"cookies":false,"type":"","demo":"databases\/create-float-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-float-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/integer":{"post":{"summary":"Create Integer Attribute","operationId":"databasesCreateIntegerAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeInteger","schema":{"$ref":"#\/definitions\/attributeInteger"}}},"x-appwrite":{"method":"createIntegerAttribute","weight":96,"cookies":false,"type":"","demo":"databases\/create-integer-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-integer-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/ip":{"post":{"summary":"Create IP Address Attribute","operationId":"databasesCreateIpAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeIP","schema":{"$ref":"#\/definitions\/attributeIp"}}},"x-appwrite":{"method":"createIpAttribute","weight":94,"cookies":false,"type":"","demo":"databases\/create-ip-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-ip-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":null},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/string":{"post":{"summary":"Create String Attribute","operationId":"databasesCreateStringAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeString","schema":{"$ref":"#\/definitions\/attributeString"}}},"x-appwrite":{"method":"createStringAttribute","weight":91,"cookies":false,"type":"","demo":"databases\/create-string-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-string-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[DEFAULT]"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","size","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/url":{"post":{"summary":"Create URL Attribute","operationId":"databasesCreateUrlAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"AttributeURL","schema":{"$ref":"#\/definitions\/attributeUrl"}}},"x-appwrite":{"method":"createUrlAttribute","weight":95,"cookies":false,"type":"","demo":"databases\/create-url-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-url-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"https:\/\/example.com"},"array":{"type":"boolean","description":"Is attribute an array?","default":false,"x-example":false}},"required":["key","required"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/attributes\/{key}":{"get":{"summary":"Get Attribute","operationId":"databasesGetAttribute","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"AttributeBoolean, or AttributeInteger, or AttributeFloat, or AttributeEmail, or AttributeEnum, or AttributeURL, or AttributeIP, or AttributeString","schema":{"x-oneOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]}}},"x-appwrite":{"method":"getAttribute","weight":100,"cookies":false,"type":"","demo":"databases\/get-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]},"delete":{"summary":"Delete Attribute","operationId":"databasesDeleteAttribute","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteAttribute","weight":101,"cookies":false,"type":"","demo":"databases\/delete-attribute.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-attribute.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Attribute Key.","required":true,"type":"string","in":"path"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents":{"get":{"summary":"List Documents","operationId":"databasesListDocuments","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Documents List","schema":{"$ref":"#\/definitions\/documentList"}}},"x-appwrite":{"method":"listDocuments","weight":107,"cookies":false,"type":"","demo":"databases\/list-documents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-documents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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 generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/database#querying-documents). Maximum of 100 queries are allowed, each 128 characters long.","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. Maximum of 100 order attributes are allowed, each 128 characters long.","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. Maximum of 100 order types are allowed.","required":false,"type":"array","collectionFormat":"multi","items":{"type":"string"},"default":[],"in":"query"}]},"post":{"summary":"Create Document","operationId":"databasesCreateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"createDocument","weight":106,"cookies":false,"type":"","demo":"databases\/create-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","default":null,"x-example":"[\"role:all\"]","items":{"type":"string"}}},"required":["documentId","data"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}":{"get":{"summary":"Get Document","operationId":"databasesGetDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"getDocument","weight":108,"cookies":false,"type":"","demo":"databases\/get-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"databasesUpdateDocument","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Document","schema":{"$ref":"#\/definitions\/document"}}},"x-appwrite":{"method":"updateDocument","weight":110,"cookies":false,"type":"","demo":"databases\/update-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","description":"Collection ID.","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"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"object","description":"Document data as JSON object. Include only attribute and value pairs to be updated.","default":{},"x-example":"{}"},"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"}}},"required":["data"]}}]},"delete":{"summary":"Delete Document","operationId":"databasesDeleteDocument","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDocument","weight":111,"cookies":false,"type":"","demo":"databases\/delete-document.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-document.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"documents.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes":{"get":{"summary":"List Indexes","operationId":"databasesListIndexes","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Indexes List","schema":{"$ref":"#\/definitions\/indexList"}}},"x-appwrite":{"method":"listIndexes","weight":103,"cookies":false,"type":"","demo":"databases\/list-indexes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/list-indexes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]},"post":{"summary":"Create Index","operationId":"databasesCreateIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"201":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"createIndex","weight":102,"cookies":false,"type":"","demo":"databases\/create-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/create-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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":"Index Key.","default":null,"x-example":null},"type":{"type":"string","description":"Index type.","default":null,"x-example":"key"},"attributes":{"type":"array","description":"Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.","default":null,"x-example":null,"items":{"type":"string"}},"orders":{"type":"array","description":"Array of index orders. Maximum of 100 orders are allowed.","default":[],"x-example":null,"items":{"type":"string"}}},"required":["key","type","attributes"]}}]}},"\/databases\/{databaseId}\/collections\/{collectionId}\/indexes\/{key}":{"get":{"summary":"Get Index","operationId":"databasesGetIndex","consumes":["application\/json"],"produces":["application\/json"],"tags":["databases"],"description":"","responses":{"200":{"description":"Index","schema":{"$ref":"#\/definitions\/index"}}},"x-appwrite":{"method":"getIndex","weight":104,"cookies":false,"type":"","demo":"databases\/get-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/get-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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"}]},"delete":{"summary":"Delete Index","operationId":"databasesDeleteIndex","consumes":["application\/json"],"produces":[],"tags":["databases"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteIndex","weight":105,"cookies":false,"type":"","demo":"databases\/delete-index.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-index.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"collections.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"databaseId","description":"Database ID.","required":true,"type":"string","x-example":"[DATABASE_ID]","in":"path"},{"name":"collectionId","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.","responses":{"200":{"description":"Functions List","schema":{"$ref":"#\/definitions\/functionList"}}},"x-appwrite":{"method":"list","weight":212,"cookies":false,"type":"","demo":"functions\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"create","weight":211,"cookies":false,"type":"","demo":"functions\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"functionId":{"type":"string","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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","default":15,"x-example":1}},"required":["functionId","name","execute","runtime"]}}]}},"\/functions\/runtimes":{"get":{"summary":"List runtimes","operationId":"functionsListRuntimes","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all runtimes that are currently active on your instance.","responses":{"200":{"description":"Runtimes List","schema":{"$ref":"#\/definitions\/runtimeList"}}},"x-appwrite":{"method":"listRuntimes","weight":213,"cookies":false,"type":"","demo":"functions\/list-runtimes.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-runtimes.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/functions\/{functionId}":{"get":{"summary":"Get Function","operationId":"functionsGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"get","weight":214,"cookies":false,"type":"","demo":"functions\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]},"put":{"summary":"Update Function","operationId":"functionsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Update function by its unique ID.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"update","weight":216,"cookies":false,"type":"","demo":"functions\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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. Maximum of 100 scopes are allowed, each 64 characters long.","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. Maximum of 100 events are allowed.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":218,"cookies":false,"type":"","demo":"functions\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-function.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments":{"get":{"summary":"List Deployments","operationId":"functionsListDeployments","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a list of all the project's code deployments. You can use the query params to filter your results.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"listDeployments","weight":220,"cookies":false,"type":"","demo":"functions\/list-deployments.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-deployments.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_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 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.","responses":{"201":{"description":"Deployment","schema":{"$ref":"#\/definitions\/deployment"}}},"x-appwrite":{"method":"createDeployment","weight":219,"cookies":false,"type":"","demo":"functions\/create-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":true,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"entrypoint","description":"Entrypoint File.","required":true,"type":"string","x-example":"[ENTRYPOINT]","in":"formData"},{"name":"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.","required":true,"type":"boolean","x-example":false,"in":"formData"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}":{"get":{"summary":"Get Deployment","operationId":"functionsGetDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a code deployment by its unique ID.","responses":{"200":{"description":"Deployments List","schema":{"$ref":"#\/definitions\/deploymentList"}}},"x-appwrite":{"method":"getDeployment","weight":221,"cookies":false,"type":"","demo":"functions\/get-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"patch":{"summary":"Update Function Deployment","operationId":"functionsUpdateDeployment","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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.","responses":{"200":{"description":"Function","schema":{"$ref":"#\/definitions\/function"}}},"x-appwrite":{"method":"updateDeployment","weight":217,"cookies":false,"type":"","demo":"functions\/update-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/update-function-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]},"delete":{"summary":"Delete Deployment","operationId":"functionsDeleteDeployment","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"Delete a code deployment by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteDeployment","weight":222,"cookies":false,"type":"","demo":"functions\/delete-deployment.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/delete-deployment.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"}]}},"\/functions\/{functionId}\/deployments\/{deploymentId}\/builds\/{buildId}":{"post":{"summary":"Retry Build","operationId":"functionsRetryBuild","consumes":["application\/json"],"produces":[],"tags":["functions"],"description":"","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"retryBuild","weight":226,"cookies":false,"type":"","demo":"functions\/retry-build.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/retry-build.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"functions.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"deploymentId","description":"Deployment ID.","required":true,"type":"string","x-example":"[DEPLOYMENT_ID]","in":"path"},{"name":"buildId","description":"Build unique ID.","required":true,"type":"string","x-example":"[BUILD_ID]","in":"path"}]}},"\/functions\/{functionId}\/executions":{"get":{"summary":"List Executions","operationId":"functionsListExecutions","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"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).","responses":{"200":{"description":"Executions List","schema":{"$ref":"#\/definitions\/executionList"}}},"x-appwrite":{"method":"listExecutions","weight":224,"cookies":false,"type":"","demo":"functions\/list-executions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/list-executions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"limit","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.","responses":{"201":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"createExecution","weight":223,"cookies":false,"type":"","demo":"functions\/create-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/create-execution.md","rate-limit":60,"rate-time":60,"rate-key":"url:{url},ip:{ip}","scope":"execution.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"data":{"type":"string","description":"String of custom data to send to function.","default":"","x-example":"[DATA]"},"async":{"type":"boolean","description":"Execute code asynchronously. Default value is true.","default":true,"x-example":false}}}}]}},"\/functions\/{functionId}\/executions\/{executionId}":{"get":{"summary":"Get Execution","operationId":"functionsGetExecution","consumes":["application\/json"],"produces":["application\/json"],"tags":["functions"],"description":"Get a function execution log by its unique ID.","responses":{"200":{"description":"Execution","schema":{"$ref":"#\/definitions\/execution"}}},"x-appwrite":{"method":"getExecution","weight":225,"cookies":false,"type":"","demo":"functions\/get-execution.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/functions\/get-execution.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"execution.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"functionId","description":"Function ID.","required":true,"type":"string","x-example":"[FUNCTION_ID]","in":"path"},{"name":"executionId","description":"Execution ID.","required":true,"type":"string","x-example":"[EXECUTION_ID]","in":"path"}]}},"\/health":{"get":{"summary":"Get HTTP","operationId":"healthGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite HTTP server is up and responsive.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"get","weight":122,"cookies":false,"type":"","demo":"health\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/anti-virus":{"get":{"summary":"Get Antivirus","operationId":"healthGetAntivirus","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite Antivirus server is up and connection is successful.","responses":{"200":{"description":"Health Antivirus","schema":{"$ref":"#\/definitions\/healthAntivirus"}}},"x-appwrite":{"method":"getAntivirus","weight":132,"cookies":false,"type":"","demo":"health\/get-antivirus.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-anti-virus.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/cache":{"get":{"summary":"Get Cache","operationId":"healthGetCache","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite in-memory cache server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getCache","weight":125,"cookies":false,"type":"","demo":"health\/get-cache.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-cache.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/db":{"get":{"summary":"Get DB","operationId":"healthGetDB","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite database server is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getDB","weight":124,"cookies":false,"type":"","demo":"health\/get-d-b.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-db.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/certificates":{"get":{"summary":"Get Certificates Queue","operationId":"healthGetQueueCertificates","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of certificates that are waiting to be issued against [Letsencrypt](https:\/\/letsencrypt.org\/) in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueCertificates","weight":129,"cookies":false,"type":"","demo":"health\/get-queue-certificates.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-certificates.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/functions":{"get":{"summary":"Get Functions Queue","operationId":"healthGetQueueFunctions","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueFunctions","weight":130,"cookies":false,"type":"","demo":"health\/get-queue-functions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-functions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/logs":{"get":{"summary":"Get Logs Queue","operationId":"healthGetQueueLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of logs that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueLogs","weight":128,"cookies":false,"type":"","demo":"health\/get-queue-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/queue\/webhooks":{"get":{"summary":"Get Webhooks Queue","operationId":"healthGetQueueWebhooks","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.","responses":{"200":{"description":"Health Queue","schema":{"$ref":"#\/definitions\/healthQueue"}}},"x-appwrite":{"method":"getQueueWebhooks","weight":127,"cookies":false,"type":"","demo":"health\/get-queue-webhooks.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-queue-webhooks.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/storage\/local":{"get":{"summary":"Get Local Storage","operationId":"healthGetStorageLocal","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"description":"Check the Appwrite local storage device is up and connection is successful.","responses":{"200":{"description":"Health Status","schema":{"$ref":"#\/definitions\/healthStatus"}}},"x-appwrite":{"method":"getStorageLocal","weight":131,"cookies":false,"type":"","demo":"health\/get-storage-local.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-storage-local.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/health\/time":{"get":{"summary":"Get Time","operationId":"healthGetTime","consumes":["application\/json"],"produces":["application\/json"],"tags":["health"],"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.","responses":{"200":{"description":"Health Time","schema":{"$ref":"#\/definitions\/healthTime"}}},"x-appwrite":{"method":"getTime","weight":126,"cookies":false,"type":"","demo":"health\/get-time.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/health\/get-time.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"health.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}]}},"\/locale":{"get":{"summary":"Get User Locale","operationId":"localeGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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))","responses":{"200":{"description":"Locale","schema":{"$ref":"#\/definitions\/locale"}}},"x-appwrite":{"method":"get","weight":115,"cookies":false,"type":"","demo":"locale\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-locale.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/continents":{"get":{"summary":"List Continents","operationId":"localeGetContinents","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all continents. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Continents List","schema":{"$ref":"#\/definitions\/continentList"}}},"x-appwrite":{"method":"getContinents","weight":119,"cookies":false,"type":"","demo":"locale\/get-continents.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-continents.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries":{"get":{"summary":"List Countries","operationId":"localeGetCountries","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountries","weight":116,"cookies":false,"type":"","demo":"locale\/get-countries.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/eu":{"get":{"summary":"List EU Countries","operationId":"localeGetCountriesEU","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Countries List","schema":{"$ref":"#\/definitions\/countryList"}}},"x-appwrite":{"method":"getCountriesEU","weight":117,"cookies":false,"type":"","demo":"locale\/get-countries-e-u.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-eu.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/countries\/phones":{"get":{"summary":"List Countries Phone Codes","operationId":"localeGetCountriesPhones","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all countries phone codes. You can use the locale header to get the data in a supported language.","responses":{"200":{"description":"Phones List","schema":{"$ref":"#\/definitions\/phoneList"}}},"x-appwrite":{"method":"getCountriesPhones","weight":118,"cookies":false,"type":"","demo":"locale\/get-countries-phones.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-countries-phones.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/currencies":{"get":{"summary":"List Currencies","operationId":"localeGetCurrencies","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"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.","responses":{"200":{"description":"Currencies List","schema":{"$ref":"#\/definitions\/currencyList"}}},"x-appwrite":{"method":"getCurrencies","weight":120,"cookies":false,"type":"","demo":"locale\/get-currencies.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-currencies.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/locale\/languages":{"get":{"summary":"List Languages","operationId":"localeGetLanguages","consumes":["application\/json"],"produces":["application\/json"],"tags":["locale"],"description":"List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.","responses":{"200":{"description":"Languages List","schema":{"$ref":"#\/definitions\/languageList"}}},"x-appwrite":{"method":"getLanguages","weight":121,"cookies":false,"type":"","demo":"locale\/get-languages.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/locale\/get-languages.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"locale.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}]}},"\/storage\/buckets":{"get":{"summary":"List buckets","operationId":"storageListBuckets","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Get a list of all the storage buckets. You can use the query params to filter your results.","responses":{"200":{"description":"Buckets List","schema":{"$ref":"#\/definitions\/bucketList"}}},"x-appwrite":{"method":"listBuckets","weight":166,"cookies":false,"type":"","demo":"storage\/list-buckets.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-buckets.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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":"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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create bucket","operationId":"storageCreateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Create a new storage bucket.","responses":{"201":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"createBucket","weight":165,"cookies":false,"type":"","demo":"storage\/create-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"bucketId":{"type":"string","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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"getBucket","weight":167,"cookies":false,"type":"","demo":"storage\/get-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]},"put":{"summary":"Update Bucket","operationId":"storageUpdateBucket","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"description":"Update a storage bucket by its unique ID.","responses":{"200":{"description":"Bucket","schema":{"$ref":"#\/definitions\/bucket"}}},"x-appwrite":{"method":"updateBucket","weight":168,"cookies":false,"type":"","demo":"storage\/update-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"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 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":1},"allowedFileExtensions":{"type":"array","description":"Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteBucket","weight":169,"cookies":false,"type":"","demo":"storage\/delete-bucket.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-bucket.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"buckets.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"bucketId","description":"Bucket unique ID.","required":true,"type":"string","x-example":"[BUCKET_ID]","in":"path"}]}},"\/storage\/buckets\/{bucketId}\/files":{"get":{"summary":"List Files","operationId":"storageListFiles","consumes":["application\/json"],"produces":["application\/json"],"tags":["storage"],"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).","responses":{"200":{"description":"Files List","schema":{"$ref":"#\/definitions\/fileList"}}},"x-appwrite":{"method":"listFiles","weight":171,"cookies":false,"type":"","demo":"storage\/list-files.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/list-files.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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","responses":{"201":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"createFile","weight":170,"cookies":false,"type":"upload","demo":"storage\/create-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/create-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"getFile","weight":172,"cookies":false,"type":"","demo":"storage\/get-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"200":{"description":"File","schema":{"$ref":"#\/definitions\/file"}}},"x-appwrite":{"method":"updateFile","weight":176,"cookies":false,"type":"","demo":"storage\/update-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/update-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteFile","weight":177,"cookies":false,"type":"","demo":"storage\/delete-file.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/delete-file.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/download":{"get":{"summary":"Get File for Download","operationId":"storageGetFileDownload","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileDownload","weight":174,"cookies":false,"type":"location","demo":"storage\/get-file-download.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-download.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","description":"Storage bucket 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"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/preview":{"get":{"summary":"Get File Preview","operationId":"storageGetFilePreview","consumes":["application\/json"],"produces":["image\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"Image","schema":{"type":"file"}}},"x-appwrite":{"method":"getFilePreview","weight":173,"cookies":false,"type":"location","demo":"storage\/get-file-preview.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-preview.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","required":false,"type":"string","x-example":"jpg","default":"","in":"query"}]}},"\/storage\/buckets\/{bucketId}\/files\/{fileId}\/view":{"get":{"summary":"Get File for View","operationId":"storageGetFileView","consumes":["application\/json"],"produces":["*\/*"],"tags":["storage"],"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.","responses":{"200":{"description":"File","schema":{"type":"file"}}},"x-appwrite":{"method":"getFileView","weight":175,"cookies":false,"type":"location","demo":"storage\/get-file-view.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/storage\/get-file-view.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"files.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"bucketId","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).","responses":{"200":{"description":"Teams List","schema":{"$ref":"#\/definitions\/teamList"}}},"x-appwrite":{"method":"list","weight":181,"cookies":false,"type":"","demo":"teams\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"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 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.","responses":{"201":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"create","weight":180,"cookies":false,"type":"","demo":"teams\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"teamId":{"type":"string","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"get","weight":182,"cookies":false,"type":"","demo":"teams\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]},"put":{"summary":"Update Team","operationId":"teamsUpdate","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Update a team using its ID. Only members with the owner role can update the team.","responses":{"200":{"description":"Team","schema":{"$ref":"#\/definitions\/team"}}},"x-appwrite":{"method":"update","weight":183,"cookies":false,"type":"","demo":"teams\/update.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"New team name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]},"delete":{"summary":"Delete Team","operationId":"teamsDelete","consumes":["application\/json"],"produces":[],"tags":["teams"],"description":"Delete a team using its ID. Only team members with the owner role can delete the team.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":184,"cookies":false,"type":"","demo":"teams\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships":{"get":{"summary":"Get Team Memberships","operationId":"teamsGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"description":"Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":186,"cookies":false,"type":"","demo":"teams\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-members.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_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 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.","responses":{"201":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"createMembership","weight":185,"cookies":false,"type":"","demo":"teams\/create-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team-membership.md","rate-limit":10,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the new team member.","default":null,"x-example":"email@example.com"},"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMembership","weight":187,"cookies":false,"type":"","demo":"teams\/get-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team-member.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.read","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]},"patch":{"summary":"Update Membership Roles","operationId":"teamsUpdateMembershipRoles","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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).","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipRoles","weight":188,"cookies":false,"type":"","demo":"teams\/update-membership-roles.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-roles.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"roles":{"type":"array","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). Maximum of 100 roles are allowed, each 32 characters long.","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.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteMembership","weight":190,"cookies":false,"type":"","demo":"teams\/delete-membership.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team-membership.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"teams.write","platforms":["client","server","server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"}]}},"\/teams\/{teamId}\/memberships\/{membershipId}\/status":{"patch":{"summary":"Update Team Membership Status","operationId":"teamsUpdateMembershipStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["teams"],"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","responses":{"200":{"description":"Membership","schema":{"$ref":"#\/definitions\/membership"}}},"x-appwrite":{"method":"updateMembershipStatus","weight":189,"cookies":false,"type":"","demo":"teams\/update-membership-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-membership-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"public","platforms":["client","server"],"packaging":false,"auth":{"Project":[],"JWT":[]}},"security":[{"Project":[],"JWT":[]}],"parameters":[{"name":"teamId","description":"Team ID.","required":true,"type":"string","x-example":"[TEAM_ID]","in":"path"},{"name":"membershipId","description":"Membership ID.","required":true,"type":"string","x-example":"[MEMBERSHIP_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","description":"User ID.","default":null,"x-example":"[USER_ID]"},"secret":{"type":"string","description":"Secret key.","default":null,"x-example":"[SECRET]"}},"required":["userId","secret"]}}]}},"\/users":{"get":{"summary":"List Users","operationId":"usersList","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a list of all the project's users. You can use the query params to filter your results.","responses":{"200":{"description":"Users List","schema":{"$ref":"#\/definitions\/userList"}}},"x-appwrite":{"method":"list","weight":193,"cookies":false,"type":"","demo":"users\/list.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/list-users.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"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 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.","required":false,"type":"string","x-example":"ASC","default":"ASC","in":"query"}]},"post":{"summary":"Create User","operationId":"usersCreate","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Create a new user.","responses":{"201":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"create","weight":192,"cookies":false,"type":"","demo":"users\/create.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/create-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"payload","in":"body","schema":{"type":"object","properties":{"userId":{"type":"string","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.","default":"","x-example":"[NAME]"}},"required":["userId","email","password"]}}]}},"\/users\/{userId}":{"get":{"summary":"Get User","operationId":"usersGet","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get a user by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"get","weight":194,"cookies":false,"type":"","demo":"users\/get.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User","operationId":"usersDelete","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user by its unique ID, thereby releasing it's ID. Since ID is released and can be reused, all user-related resources like documents or storage files should be deleted before user deletion. If you want to keep ID reserved, use the [updateStatus](\/docs\/server\/users#usersUpdateStatus) endpoint instead.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"delete","weight":209,"cookies":false,"type":"","demo":"users\/delete.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/email":{"patch":{"summary":"Update Email","operationId":"usersUpdateEmail","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmail","weight":204,"cookies":false,"type":"","demo":"users\/update-email.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"email":{"type":"string","description":"User email.","default":null,"x-example":"email@example.com"}},"required":["email"]}}]}},"\/users\/{userId}\/logs":{"get":{"summary":"Get User Logs","operationId":"usersGetLogs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user activity logs list by its unique ID.","responses":{"200":{"description":"Logs List","schema":{"$ref":"#\/definitions\/logList"}}},"x-appwrite":{"method":"getLogs","weight":198,"cookies":false,"type":"","demo":"users\/get-logs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-logs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"limit","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}\/memberships":{"get":{"summary":"Get User Memberships","operationId":"usersGetMemberships","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user membership list by its unique ID.","responses":{"200":{"description":"Memberships List","schema":{"$ref":"#\/definitions\/membershipList"}}},"x-appwrite":{"method":"getMemberships","weight":197,"cookies":false,"type":"","demo":"users\/get-memberships.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-memberships.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/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.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateName","weight":202,"cookies":false,"type":"","demo":"users\/update-name.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-name.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"name":{"type":"string","description":"User name. Max length: 128 chars.","default":null,"x-example":"[NAME]"}},"required":["name"]}}]}},"\/users\/{userId}\/password":{"patch":{"summary":"Update Password","operationId":"usersUpdatePassword","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user password by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePassword","weight":203,"cookies":false,"type":"","demo":"users\/update-password.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-password.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"password":{"type":"string","description":"New user password. Must be at least 8 chars.","default":null,"x-example":"password"}},"required":["password"]}}]}},"\/users\/{userId}\/phone":{"patch":{"summary":"Update Phone","operationId":"usersUpdatePhone","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhone","weight":205,"cookies":false,"type":"","demo":"users\/update-phone.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"number":{"type":"string","description":"User phone number.","default":null,"x-example":null}},"required":["number"]}}]}},"\/users\/{userId}\/prefs":{"get":{"summary":"Get User Preferences","operationId":"usersGetPrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user preferences by its unique ID.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"getPrefs","weight":195,"cookies":false,"type":"","demo":"users\/get-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"patch":{"summary":"Update User Preferences","operationId":"usersUpdatePrefs","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"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.","responses":{"200":{"description":"Preferences","schema":{"$ref":"#\/definitions\/preferences"}}},"x-appwrite":{"method":"updatePrefs","weight":206,"cookies":false,"type":"","demo":"users\/update-prefs.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-prefs.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"prefs":{"type":"object","description":"Prefs key-value JSON object.","default":{},"x-example":"{}"}},"required":["prefs"]}}]}},"\/users\/{userId}\/sessions":{"get":{"summary":"Get User Sessions","operationId":"usersGetSessions","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Get the user sessions list by its unique ID.","responses":{"200":{"description":"Sessions List","schema":{"$ref":"#\/definitions\/sessionList"}}},"x-appwrite":{"method":"getSessions","weight":196,"cookies":false,"type":"","demo":"users\/get-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/get-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.read","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]},"delete":{"summary":"Delete User Sessions","operationId":"usersDeleteSessions","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete all user's sessions by using the user's unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSessions","weight":208,"cookies":false,"type":"","demo":"users\/delete-sessions.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-sessions.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"}]}},"\/users\/{userId}\/sessions\/{sessionId}":{"delete":{"summary":"Delete User Session","operationId":"usersDeleteSession","consumes":["application\/json"],"produces":[],"tags":["users"],"description":"Delete a user sessions by its unique ID.","responses":{"204":{"description":"No content"}},"x-appwrite":{"method":"deleteSession","weight":207,"cookies":false,"type":"","demo":"users\/delete-session.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/delete-user-session.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"sessionId","description":"Session ID.","required":true,"type":"string","x-example":"[SESSION_ID]","in":"path"}]}},"\/users\/{userId}\/status":{"patch":{"summary":"Update User Status","operationId":"usersUpdateStatus","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user status by its unique ID. Use this endpoint as an alternative to deleting a user if you want to keep user's ID reserved.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateStatus","weight":199,"cookies":false,"type":"","demo":"users\/update-status.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-status.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"status":{"type":"boolean","description":"User Status. To activate the user pass `true` and to block the user pass `false`.","default":null,"x-example":false}},"required":["status"]}}]}},"\/users\/{userId}\/verification":{"patch":{"summary":"Update Email Verification","operationId":"usersUpdateEmailVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user email verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updateEmailVerification","weight":200,"cookies":false,"type":"","demo":"users\/update-email-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-email-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"emailVerification":{"type":"boolean","description":"User email verification status.","default":null,"x-example":false}},"required":["emailVerification"]}}]}},"\/users\/{userId}\/verification\/phone":{"patch":{"summary":"Update Phone Verification","operationId":"usersUpdatePhoneVerification","consumes":["application\/json"],"produces":["application\/json"],"tags":["users"],"description":"Update the user phone verification status by its unique ID.","responses":{"200":{"description":"User","schema":{"$ref":"#\/definitions\/user"}}},"x-appwrite":{"method":"updatePhoneVerification","weight":201,"cookies":false,"type":"","demo":"users\/update-phone-verification.md","edit":"https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/update-user-phone-verification.md","rate-limit":0,"rate-time":3600,"rate-key":"url:{url},ip:{ip}","scope":"users.write","platforms":["server"],"packaging":false,"auth":{"Project":[],"Key":[]}},"security":[{"Project":[],"Key":[]}],"parameters":[{"name":"userId","description":"User ID.","required":true,"type":"string","x-example":"[USER_ID]","in":"path"},{"name":"payload","in":"body","schema":{"type":"object","properties":{"phoneVerification":{"type":"boolean","description":"User phone verification status.","default":null,"x-example":false}},"required":["phoneVerification"]}}]}}},"tags":[{"name":"account","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":"databases","description":"The Databases 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.","x-example":5,"format":"int32"},"documents":{"type":"array","description":"List of documents.","items":{"type":"object","$ref":"#\/definitions\/document"},"x-example":""}},"required":["total","documents"]},"collectionList":{"description":"Collections List","type":"object","properties":{"total":{"type":"integer","description":"Total number of collections documents that matched your query.","x-example":5,"format":"int32"},"collections":{"type":"array","description":"List of collections.","items":{"type":"object","$ref":"#\/definitions\/collection"},"x-example":""}},"required":["total","collections"]},"indexList":{"description":"Indexes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of indexes documents that matched your query.","x-example":5,"format":"int32"},"indexes":{"type":"array","description":"List of indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":""}},"required":["total","indexes"]},"userList":{"description":"Users List","type":"object","properties":{"total":{"type":"integer","description":"Total number of users documents that matched your query.","x-example":5,"format":"int32"},"users":{"type":"array","description":"List of users.","items":{"type":"object","$ref":"#\/definitions\/user"},"x-example":""}},"required":["total","users"]},"sessionList":{"description":"Sessions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of sessions documents that matched your query.","x-example":5,"format":"int32"},"sessions":{"type":"array","description":"List of sessions.","items":{"type":"object","$ref":"#\/definitions\/session"},"x-example":""}},"required":["total","sessions"]},"logList":{"description":"Logs List","type":"object","properties":{"total":{"type":"integer","description":"Total number of logs documents that matched your query.","x-example":5,"format":"int32"},"logs":{"type":"array","description":"List of logs.","items":{"type":"object","$ref":"#\/definitions\/log"},"x-example":""}},"required":["total","logs"]},"fileList":{"description":"Files List","type":"object","properties":{"total":{"type":"integer","description":"Total number of files documents that matched your query.","x-example":5,"format":"int32"},"files":{"type":"array","description":"List of files.","items":{"type":"object","$ref":"#\/definitions\/file"},"x-example":""}},"required":["total","files"]},"bucketList":{"description":"Buckets List","type":"object","properties":{"total":{"type":"integer","description":"Total number of buckets documents that matched your query.","x-example":5,"format":"int32"},"buckets":{"type":"array","description":"List of buckets.","items":{"type":"object","$ref":"#\/definitions\/bucket"},"x-example":""}},"required":["total","buckets"]},"teamList":{"description":"Teams List","type":"object","properties":{"total":{"type":"integer","description":"Total number of teams documents that matched your query.","x-example":5,"format":"int32"},"teams":{"type":"array","description":"List of teams.","items":{"type":"object","$ref":"#\/definitions\/team"},"x-example":""}},"required":["total","teams"]},"membershipList":{"description":"Memberships List","type":"object","properties":{"total":{"type":"integer","description":"Total number of memberships documents that matched your query.","x-example":5,"format":"int32"},"memberships":{"type":"array","description":"List of memberships.","items":{"type":"object","$ref":"#\/definitions\/membership"},"x-example":""}},"required":["total","memberships"]},"functionList":{"description":"Functions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of functions documents that matched your query.","x-example":5,"format":"int32"},"functions":{"type":"array","description":"List of functions.","items":{"type":"object","$ref":"#\/definitions\/function"},"x-example":""}},"required":["total","functions"]},"runtimeList":{"description":"Runtimes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of runtimes documents that matched your query.","x-example":5,"format":"int32"},"runtimes":{"type":"array","description":"List of runtimes.","items":{"type":"object","$ref":"#\/definitions\/runtime"},"x-example":""}},"required":["total","runtimes"]},"deploymentList":{"description":"Deployments List","type":"object","properties":{"total":{"type":"integer","description":"Total number of deployments documents that matched your query.","x-example":5,"format":"int32"},"deployments":{"type":"array","description":"List of deployments.","items":{"type":"object","$ref":"#\/definitions\/deployment"},"x-example":""}},"required":["total","deployments"]},"executionList":{"description":"Executions List","type":"object","properties":{"total":{"type":"integer","description":"Total number of executions documents that matched your query.","x-example":5,"format":"int32"},"executions":{"type":"array","description":"List of executions.","items":{"type":"object","$ref":"#\/definitions\/execution"},"x-example":""}},"required":["total","executions"]},"countryList":{"description":"Countries List","type":"object","properties":{"total":{"type":"integer","description":"Total number of countries documents that matched your query.","x-example":5,"format":"int32"},"countries":{"type":"array","description":"List of countries.","items":{"type":"object","$ref":"#\/definitions\/country"},"x-example":""}},"required":["total","countries"]},"continentList":{"description":"Continents List","type":"object","properties":{"total":{"type":"integer","description":"Total number of continents documents that matched your query.","x-example":5,"format":"int32"},"continents":{"type":"array","description":"List of continents.","items":{"type":"object","$ref":"#\/definitions\/continent"},"x-example":""}},"required":["total","continents"]},"languageList":{"description":"Languages List","type":"object","properties":{"total":{"type":"integer","description":"Total number of languages documents that matched your query.","x-example":5,"format":"int32"},"languages":{"type":"array","description":"List of languages.","items":{"type":"object","$ref":"#\/definitions\/language"},"x-example":""}},"required":["total","languages"]},"currencyList":{"description":"Currencies List","type":"object","properties":{"total":{"type":"integer","description":"Total number of currencies documents that matched your query.","x-example":5,"format":"int32"},"currencies":{"type":"array","description":"List of currencies.","items":{"type":"object","$ref":"#\/definitions\/currency"},"x-example":""}},"required":["total","currencies"]},"phoneList":{"description":"Phones List","type":"object","properties":{"total":{"type":"integer","description":"Total number of phones documents that matched your query.","x-example":5,"format":"int32"},"phones":{"type":"array","description":"List of phones.","items":{"type":"object","$ref":"#\/definitions\/phone"},"x-example":""}},"required":["total","phones"]},"database":{"description":"Database","type":"object","properties":{"$id":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Database name.","x-example":"My Database"}},"required":["$id","name"]},"collection":{"description":"Collection","type":"object","properties":{"$id":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Collection creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Collection update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Collection read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Collection write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"},"databaseId":{"type":"string","description":"Database ID.","x-example":"5e5ea5c16897e"},"name":{"type":"string","description":"Collection name.","x-example":"My Collection"},"enabled":{"type":"boolean","description":"Collection enabled.","x-example":false},"permission":{"type":"string","description":"Collection permission model. Possible values: `document` or `collection`","x-example":"document"},"attributes":{"type":"array","description":"Collection attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":{}},"indexes":{"type":"array","description":"Collection indexes.","items":{"type":"object","$ref":"#\/definitions\/index"},"x-example":{}}},"required":["$id","$createdAt","$updatedAt","$read","$write","databaseId","name","enabled","permission","attributes","indexes"]},"attributeList":{"description":"Attributes List","type":"object","properties":{"total":{"type":"integer","description":"Total number of attributes in the given collection.","x-example":5,"format":"int32"},"attributes":{"type":"array","description":"List of attributes.","items":{"x-anyOf":[{"$ref":"#\/definitions\/attributeBoolean"},{"$ref":"#\/definitions\/attributeInteger"},{"$ref":"#\/definitions\/attributeFloat"},{"$ref":"#\/definitions\/attributeEmail"},{"$ref":"#\/definitions\/attributeEnum"},{"$ref":"#\/definitions\/attributeUrl"},{"$ref":"#\/definitions\/attributeIp"},{"$ref":"#\/definitions\/attributeString"}]},"x-example":""}},"required":["total","attributes"]},"attributeString":{"description":"AttributeString","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"fullName"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"size":{"type":"integer","description":"Attribute size.","x-example":128,"format":"int32"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default","x-nullable":true}},"required":["key","type","status","required","size"]},"attributeInteger":{"description":"AttributeInteger","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"count"},"type":{"type":"string","description":"Attribute type.","x-example":"integer"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"integer","description":"Minimum value to enforce for new documents.","x-example":1,"format":"int32","x-nullable":true},"max":{"type":"integer","description":"Maximum value to enforce for new documents.","x-example":10,"format":"int32","x-nullable":true},"default":{"type":"integer","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":10,"format":"int32","x-nullable":true}},"required":["key","type","status","required"]},"attributeFloat":{"description":"AttributeFloat","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"percentageCompleted"},"type":{"type":"string","description":"Attribute type.","x-example":"double"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"min":{"type":"number","description":"Minimum value to enforce for new documents.","x-example":1.5,"format":"double","x-nullable":true},"max":{"type":"number","description":"Maximum value to enforce for new documents.","x-example":10.5,"format":"double","x-nullable":true},"default":{"type":"number","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":2.5,"format":"double","x-nullable":true}},"required":["key","type","status","required"]},"attributeBoolean":{"description":"AttributeBoolean","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"isEnabled"},"type":{"type":"string","description":"Attribute type.","x-example":"boolean"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"default":{"type":"boolean","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":false,"x-nullable":true}},"required":["key","type","status","required"]},"attributeEmail":{"description":"AttributeEmail","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"userEmail"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"email"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"default@example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeEnum":{"description":"AttributeEnum","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"status"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"elements":{"type":"array","description":"Array of elements in enumerated type.","items":{"type":"string"},"x-example":"element"},"format":{"type":"string","description":"String format.","x-example":"enum"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"element","x-nullable":true}},"required":["key","type","status","required","elements","format"]},"attributeIp":{"description":"AttributeIP","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"ipAddress"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"ip"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"192.0.2.0","x-nullable":true}},"required":["key","type","status","required","format"]},"attributeUrl":{"description":"AttributeURL","type":"object","properties":{"key":{"type":"string","description":"Attribute Key.","x-example":"githubUrl"},"type":{"type":"string","description":"Attribute type.","x-example":"string"},"status":{"type":"string","description":"Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"required":{"type":"boolean","description":"Is attribute required?","x-example":true},"array":{"type":"boolean","description":"Is attribute an array?","x-example":false,"x-nullable":true},"format":{"type":"string","description":"String format.","x-example":"url"},"default":{"type":"string","description":"Default value for attribute when not provided. Cannot be set when attribute is required.","x-example":"http:\/\/example.com","x-nullable":true}},"required":["key","type","status","required","format"]},"index":{"description":"Index","type":"object","properties":{"key":{"type":"string","description":"Index Key.","x-example":"index1"},"type":{"type":"string","description":"Index type.","x-example":"primary"},"status":{"type":"string","description":"Index status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`","x-example":"available"},"attributes":{"type":"array","description":"Index attributes.","items":{"type":"string"},"x-example":[]},"orders":{"type":"array","description":"Index orders.","items":{"type":"string"},"x-example":[]}},"required":["key","type","status","attributes","orders"]},"document":{"description":"Document","type":"object","properties":{"$id":{"type":"string","description":"Document ID.","x-example":"5e5ea5c16897e"},"$collection":{"type":"string","description":"Collection ID.","x-example":"5e5ea5c15117e"},"$createdAt":{"type":"integer","description":"Document creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Document update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Document read permissions.","items":{"type":"string"},"x-example":"role:all"},"$write":{"type":"array","description":"Document write permissions.","items":{"type":"string"},"x-example":"user:608f9da25e7e1"}},"additionalProperties":true,"required":["$id","$collection","$createdAt","$updatedAt","$read","$write"]},"log":{"description":"Log","type":"object","properties":{"event":{"type":"string","description":"Event name.","x-example":"account.sessions.create"},"userId":{"type":"string","description":"User ID.","x-example":"610fc2f985ee0"},"userEmail":{"type":"string","description":"User Email.","x-example":"john@appwrite.io"},"userName":{"type":"string","description":"User Name.","x-example":"John Doe"},"mode":{"type":"string","description":"API mode when event triggered.","x-example":"admin"},"ip":{"type":"string","description":"IP session in use when the session was created.","x-example":"127.0.0.1"},"time":{"type":"integer","description":"Log creation time in Unix timestamp.","x-example":1592981250,"format":"int32"},"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"}},"required":["event","userId","userEmail","userName","mode","ip","time","osCode","osName","osVersion","clientType","clientCode","clientName","clientVersion","clientEngine","clientEngineVersion","deviceName","deviceBrand","deviceModel","countryCode","countryName"]},"user":{"description":"User","type":"object","properties":{"$id":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"User creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"User update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"User name.","x-example":"John Doe"},"registration":{"type":"integer","description":"User registration date in Unix timestamp.","x-example":1592981250,"format":"int32"},"status":{"type":"boolean","description":"User status. Pass `true` for enabled and `false` for disabled.","x-example":true},"passwordUpdate":{"type":"integer","description":"Unix timestamp of the most recent password update","x-example":1592981250,"format":"int32"},"email":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"phone":{"type":"string","description":"User phone number in E.164 format.","x-example":"+4930901820"},"emailVerification":{"type":"boolean","description":"Email verification status.","x-example":true},"phoneVerification":{"type":"boolean","description":"Phone verification status.","x-example":true},"prefs":{"type":"object","description":"User preferences as a key-value object","x-example":{"theme":"pink","timezone":"UTC"},"items":{"type":"object","$ref":"#\/definitions\/preferences"}}},"required":["$id","$createdAt","$updatedAt","name","registration","status","passwordUpdate","email","phone","emailVerification","phoneVerification","prefs"]},"preferences":{"description":"Preferences","type":"object","additionalProperties":true},"session":{"description":"Session","type":"object","properties":{"$id":{"type":"string","description":"Session ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Session creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5bb8c16897e"},"expire":{"type":"integer","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","$createdAt","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"},"$createdAt":{"type":"integer","description":"Token creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"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","$createdAt","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"},"$createdAt":{"type":"integer","description":"File creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"File update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","name","signature","mimeType","sizeOriginal","chunksTotal","chunksUploaded"]},"bucket":{"description":"Bucket","type":"object","properties":{"$id":{"type":"string","description":"Bucket ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Bucket creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Bucket update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$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"},"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","$createdAt","$updatedAt","$read","$write","permission","name","enabled","maximumFileSize","allowedFileExtensions","encryption","antivirus"]},"team":{"description":"Team","type":"object","properties":{"$id":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Team creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Team update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"name":{"type":"string","description":"Team name.","x-example":"VIP"},"total":{"type":"integer","description":"Total number of team members.","x-example":7,"format":"int32"}},"required":["$id","$createdAt","$updatedAt","name","total"]},"membership":{"description":"Membership","type":"object","properties":{"$id":{"type":"string","description":"Membership ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Membership creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Membership update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"userId":{"type":"string","description":"User ID.","x-example":"5e5ea5c16897e"},"userName":{"type":"string","description":"User name.","x-example":"John Doe"},"userEmail":{"type":"string","description":"User email address.","x-example":"john@appwrite.io"},"teamId":{"type":"string","description":"Team ID.","x-example":"5e5ea5c16897e"},"teamName":{"type":"string","description":"Team name.","x-example":"VIP"},"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","$createdAt","$updatedAt","userId","userName","userEmail","teamId","teamName","invited","joined","confirm","roles"]},"function":{"description":"Function","type":"object","properties":{"$id":{"type":"string","description":"Function ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Function creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Function update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"execute":{"type":"array","description":"Execution permissions.","items":{"type":"string"},"x-example":"role:member"},"name":{"type":"string","description":"Function name.","x-example":"My Function"},"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","$createdAt","$updatedAt","execute","name","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"},"$createdAt":{"type":"integer","description":"Deployment creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Deployment update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"resourceId":{"type":"string","description":"Resource ID.","x-example":"5e5ea6g16897e"},"resourceType":{"type":"string","description":"Resource type.","x-example":"functions"},"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","$createdAt","$updatedAt","resourceId","resourceType","entrypoint","size","buildId","activate","status","buildStdout","buildStderr"]},"execution":{"description":"Execution","type":"object","properties":{"$id":{"type":"string","description":"Execution ID.","x-example":"5e5ea5c16897e"},"$createdAt":{"type":"integer","description":"Execution creation date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$updatedAt":{"type":"integer","description":"Execution update date in Unix timestamp.","x-example":1592981250,"format":"int32"},"$read":{"type":"array","description":"Execution read permissions.","items":{"type":"string"},"x-example":"role:all"},"functionId":{"type":"string","description":"Function ID.","x-example":"5e5ea6g16897e"},"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"},"response":{"type":"string","description":"The script response output string. Logs the last 4,000 characters of the execution response 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","$createdAt","$updatedAt","$read","functionId","trigger","status","statusCode","response","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","url":"https:\/\/appwrite.io\/docs"}} \ No newline at end of file diff --git a/app/controllers/api/database.php b/app/controllers/api/databases.php similarity index 55% rename from app/controllers/api/database.php rename to app/controllers/api/databases.php index 8414cac03..454974fe5 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/databases.php @@ -40,6 +40,7 @@ use Appwrite\Event\Audit as EventAudit; use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Event; use Appwrite\Stats\Stats; +use Utopia\Config\Config; use MaxMind\Db\Reader; /** @@ -49,7 +50,7 @@ use MaxMind\Db\Reader; * @return Document Newly created attribute document * @throws Exception */ -function createAttribute(string $collectionId, Document $attribute, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Event $events, Stats $usage): Document +function createAttribute(string $databaseId, string $collectionId, Document $attribute, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Event $events, Stats $usage): Document { $key = $attribute->getAttribute('key'); $type = $attribute->getAttribute('type', ''); @@ -62,7 +63,14 @@ function createAttribute(string $collectionId, Document $attribute, Response $re $filters = $attribute->getAttribute('filters', []); // filters are hidden from the endpoint $default = $attribute->getAttribute('default'); - $collection = $dbForProject->getDocument('collections', $collectionId); + + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); @@ -85,8 +93,10 @@ function createAttribute(string $collectionId, Document $attribute, Response $re try { $attribute = new Document([ - '$id' => $collection->getInternalId() . '_' . $key, + '$id' => $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, 'key' => $key, + 'databaseInternalId' => $db->getInternalId(), + 'databaseId' => $db->getInternalId(), 'collectionInternalId' => $collection->getInternalId(), 'collectionId' => $collectionId, 'type' => $type, @@ -109,25 +119,30 @@ function createAttribute(string $collectionId, Document $attribute, Response $re throw new Exception('Attribute limit exceeded', 400, Exception::ATTRIBUTE_LIMIT_EXCEEDED); } - $dbForProject->deleteCachedDocument('collections', $collectionId); - $dbForProject->deleteCachedCollection('collection_' . $collection->getInternalId()); + $dbForProject->deleteCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->deleteCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); - $usage->setParam('database.collections.update', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.update', 1); $database ->setType(DATABASE_TYPE_CREATE_ATTRIBUTE) + ->setDatabase($db) ->setCollection($collection) ->setDocument($attribute) ; $events - ->setContext($collection) + ->setContext('collection', $collection) + ->setContext('database', $db) + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) ->setParam('attributeId', $attribute->getId()) ; $audits - ->setResource('collection/' . $collectionId) + ->setResource('database/' . $db->getId() . '/collection/' . $collectionId) ->setPayload($attribute->getArrayCopy()) ; @@ -136,71 +151,93 @@ function createAttribute(string $collectionId, Document $attribute, Response $re return $attribute; } -App::post('/v1/database/collections') - ->desc('Create Collection') +App::post('/v1/databases') + ->desc('Create Database') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].create') - ->label('scope', 'collections.write') + ->label('event', 'databases.[databaseId].create') + ->label('scope', 'databases.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') - ->label('sdk.method', 'createCollection') - ->label('sdk.description', '/docs/references/database/create-collection.md') + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'create') + ->label('sdk.description', '/docs/references/databases/create-database.md') // create this file later ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_COLLECTION) - ->param('collectionId', '', new CustomId(), '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.') + ->label('sdk.response.model', Response::MODEL_DATABASE) // Model for database needs to be created + ->param('databaseId', '', new CustomId(), '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.') ->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.') - ->param('permission', null, new WhiteList(['document', 'collection']), 'Specifies the permissions model used in this collection, which accepts either \'collection\' or \'document\'. For \'collection\' level permission, the permissions specified in read and write params are applied to all documents in the collection. For \'document\' level permissions, read and write permissions are specified in each document. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.') - ->param('read', null, new Permissions(), '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.') - ->param('write', null, new Permissions(), '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.') ->inject('response') ->inject('dbForProject') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $name, ?string $permission, ?array $read, ?array $write, Response $response, Database $dbForProject, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $name, Response $response, Database $dbForProject, EventAudit $audits, Stats $usage, Event $events) { - $collectionId = $collectionId == 'unique()' ? $dbForProject->getId() : $collectionId; + $databaseId = $databaseId == 'unique()' ? $dbForProject->getId() : $databaseId; try { - $dbForProject->createDocument('collections', new Document([ - '$id' => $collectionId, - '$read' => $read ?? [], // Collection permissions for collection documents (based on permission model) - '$write' => $write ?? [], // Collection permissions for collection documents (based on permission model) - 'permission' => $permission, // Permissions model type (document vs collection) - 'enabled' => true, + $dbForProject->createDocument('databases', new Document([ + '$id' => $databaseId, 'name' => $name, - 'search' => implode(' ', [$collectionId, $name]), + 'search' => implode(' ', [$databaseId, $name]), ])); - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = $dbForProject->getDocument('databases', $databaseId); - $dbForProject->createCollection('collection_' . $collection->getInternalId()); + $collections = Config::getParam('collections', [])['collections'] ?? []; + if (empty($collections)) { + throw new Exception('Collections collection is not configured.', 500, Exception::GENERAL_SERVER_ERROR); + } + + $attributes = []; + $indexes = []; + + foreach ($collections['attributes'] as $attribute) { + $attributes[] = new Document([ + '$id' => $attribute['$id'], + 'type' => $attribute['type'], + 'size' => $attribute['size'], + 'required' => $attribute['required'], + 'signed' => $attribute['signed'], + 'array' => $attribute['array'], + 'filters' => $attribute['filters'], + 'default' => $attribute['default'] ?? null, + 'format' => $attribute['format'] ?? '' + ]); + } + + foreach ($collections['indexes'] as $index) { + $indexes[] = new Document([ + '$id' => $index['$id'], + 'type' => $index['type'], + 'attributes' => $index['attributes'], + 'lengths' => $index['lengths'], + 'orders' => $index['orders'], + ]); + } + $dbForProject->createCollection('database_' . $database->getInternalId(), $attributes, $indexes); } catch (DuplicateException $th) { - throw new Exception('Collection already exists', 409, Exception::COLLECTION_ALREADY_EXISTS); - } catch (LimitException $th) { - throw new Exception('Collection limit exceeded', 400, Exception::COLLECTION_LIMIT_EXCEEDED); + throw new Exception('Database already exists', 409, Exception::DATABASE_ALREADY_EXISTS); } $audits - ->setResource('collection/' . $collectionId) - ->setPayload($collection->getArrayCopy()) + ->setResource('database/' . $databaseId) + ->setPayload($database->getArrayCopy()) ; - $events->setParam('collectionId', $collection->getId()); - $usage->setParam('database.collections.create', 1); + $events->setParam('databaseId', $database->getId()); + $usage->setParam('databases.create', 1); $response->setStatusCode(Response::STATUS_CODE_CREATED); - $response->dynamic($collection, Response::MODEL_COLLECTION); + $response->dynamic($database, Response::MODEL_DATABASE); }); -App::get('/v1/database/collections') - ->desc('List Collections') +App::get('/v1/databases') + ->desc('List Databases') ->groups(['api', 'database']) - ->label('scope', 'collections.read') + ->label('scope', 'databases.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') - ->label('sdk.method', 'listCollections') - ->label('sdk.description', '/docs/references/database/list-collections.md') + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'list') + ->label('sdk.description', '/docs/references/databases/list.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_COLLECTION_LIST) @@ -216,7 +253,336 @@ App::get('/v1/database/collections') ->action(function (string $search, int $limit, int $offset, string $cursor, string $cursorDirection, string $orderType, Response $response, Database $dbForProject, Stats $usage) { if (!empty($cursor)) { - $cursorCollection = $dbForProject->getDocument('collections', $cursor); + $cursorDocument = $dbForProject->getDocument('databases', $cursor); + + if ($cursorDocument->isEmpty()) { + throw new Exception("Collection '{$cursor}' for the 'cursor' value not found.", 400, Exception::GENERAL_CURSOR_NOT_FOUND); + } + } + + $queries = []; + + if (!empty($search)) { + $queries[] = new Query('search', Query::TYPE_SEARCH, [$search]); + } + + $usage->setParam('databases.read', 1); + + $response->dynamic(new Document([ + 'databases' => $dbForProject->find('databases', $queries, $limit, $offset, [], [$orderType], $cursorDocument ?? null, $cursorDirection), + 'total' => $dbForProject->count('databases', $queries, APP_LIMIT_COUNT), + ]), Response::MODEL_DATABASE_LIST); + }); + +App::get('/v1/databases/:databaseId') + ->desc('Get Database') + ->groups(['api', 'database']) + ->label('scope', 'databases.read') + ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'get') + ->label('sdk.description', '/docs/references/databases/get.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_COLLECTION) + ->param('databaseId', '', new UID(), 'Database ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('usage') + ->action(function (string $databaseId, Response $response, Database $dbForProject, Stats $usage) { + + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + $usage->setParam('databases.read', 1); + + $response->dynamic($database, Response::MODEL_DATABASE); + }); + +App::get('/v1/databases/:databaseId/logs') + ->desc('List Collection Logs') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'listLogs') + ->label('sdk.description', '/docs/references/databases/get-collection-logs.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_LOG_LIST) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('limit', 25, new Range(0, 100), 'Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) + ->param('offset', 0, new Range(0, APP_LIMIT_COUNT), 'Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)', true) + ->inject('response') + ->inject('dbForProject') + ->inject('locale') + ->inject('geodb') + ->action(function (string $databaseId, int $limit, int $offset, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { + + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + $audit = new Audit($dbForProject); + $resource = 'database/' . $databaseId; + $logs = $audit->getLogsByResource($resource, $limit, $offset); + foreach ($logs as $i => &$log) { + $log['userAgent'] = (!empty($log['userAgent'])) ? $log['userAgent'] : 'UNKNOWN'; + + $detector = new Detector($log['userAgent']); + $detector->skipBotDetection(); // OPTIONAL: If called, bot detection will completely be skipped (bots will be detected as regular devices then) + + $os = $detector->getOS(); + $client = $detector->getClient(); + $device = $detector->getDevice(); + + $output[$i] = new Document([ + 'event' => $log['event'], + 'userId' => $log['userId'], + 'userEmail' => $log['data']['userEmail'] ?? null, + 'userName' => $log['data']['userName'] ?? null, + 'mode' => $log['data']['mode'] ?? null, + 'ip' => $log['ip'], + 'time' => $log['time'], + 'osCode' => $os['osCode'], + 'osName' => $os['osName'], + 'osVersion' => $os['osVersion'], + 'clientType' => $client['clientType'], + 'clientCode' => $client['clientCode'], + 'clientName' => $client['clientName'], + 'clientVersion' => $client['clientVersion'], + 'clientEngine' => $client['clientEngine'], + 'clientEngineVersion' => $client['clientEngineVersion'], + 'deviceName' => $device['deviceName'], + 'deviceBrand' => $device['deviceBrand'], + 'deviceModel' => $device['deviceModel'] + ]); + + $record = $geodb->get($log['ip']); + + if ($record) { + $output[$i]['countryCode'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), false) ? \strtolower($record['country']['iso_code']) : '--'; + $output[$i]['countryName'] = $locale->getText('countries.' . strtolower($record['country']['iso_code']), $locale->getText('locale.country.unknown')); + } else { + $output[$i]['countryCode'] = '--'; + $output[$i]['countryName'] = $locale->getText('locale.country.unknown'); + } + } + + $response->dynamic(new Document([ + 'total' => $audit->countLogsByResource($resource), + 'logs' => $output, + ]), Response::MODEL_LOG_LIST); + }); + + +App::put('/v1/databases/:databaseId') + ->desc('Update Database') + ->groups(['api', 'database']) + ->label('scope', 'databases.write') + ->label('event', 'databases.[databaseId].update') + ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'update') + ->label('sdk.description', '/docs/references/databases/update.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_COLLECTION) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') + ->inject('dbForProject') + ->inject('audits') + ->inject('usage') + ->inject('events') + ->action(function (string $databaseId, string $name, Response $response, Database $dbForProject, EventAudit $audits, Stats $usage, Event $events) { + + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + try { + $database = $dbForProject->updateDocument('databases', $databaseId, $database + ->setAttribute('name', $name) + ->setAttribute('search', implode(' ', [$databaseId, $name]))); + } catch (AuthorizationException $exception) { + throw new Exception('Unauthorized permissions', 401, Exception::USER_UNAUTHORIZED); + } catch (StructureException $exception) { + throw new Exception('Bad structure. ' . $exception->getMessage(), 400, Exception::DOCUMENT_INVALID_STRUCTURE); + } + + $audits + ->setResource('database/' . $databaseId) + ->setPayload($database->getArrayCopy()) + ; + + $usage->setParam('databases.update', 1); + $events->setParam('databaseId', $database->getId()); + + $response->dynamic($database, Response::MODEL_DATABASE); + }); + +App::delete('/v1/databases/:databaseId') + ->desc('Delete Database') + ->groups(['api', 'database']) + ->label('scope', 'databases.write') + ->label('event', 'databases.[databaseId].delete') + ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'delete') + ->label('sdk.description', '/docs/references/databases/delete.md') + ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) + ->label('sdk.response.model', Response::MODEL_NONE) + ->param('databaseId', '', new UID(), 'Database ID.') + ->inject('response') + ->inject('dbForProject') + ->inject('events') + ->inject('audits') + ->inject('deletes') + ->inject('usage') + ->action(function (string $databaseId, Response $response, Database $dbForProject, Event $events, EventAudit $audits, Delete $deletes, Stats $usage) { + + $database = $dbForProject->getDocument('databases', $databaseId); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + if (!$dbForProject->deleteDocument('databases', $databaseId)) { + throw new Exception('Failed to remove collection from DB', 500, Exception::GENERAL_SERVER_ERROR); + } + + $dbForProject->deleteCachedCollection('databases' . $database->getInternalId()); + + $deletes + ->setType(DELETE_TYPE_DOCUMENT) + ->setDocument($database) + ; + + $events + ->setParam('databaseId', $database->getId()) + ->setPayload($response->output($database, Response::MODEL_DATABASE)) + ; + + $audits + ->setResource('database/' . $databaseId) + ->setPayload($database->getArrayCopy()) + ; + + $usage->setParam('databases.delete', 1); + + $response->noContent(); + }); + +App::post('/v1/databases/:databaseId/collections') + ->desc('Create Collection') + ->groups(['api', 'database']) + ->label('event', 'databases.[databaseId].collections.[collectionId].create') + ->label('scope', 'collections.write') + ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'createCollection') + ->label('sdk.description', '/docs/references/databases/create-collection.md') + ->label('sdk.response.code', Response::STATUS_CODE_CREATED) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_COLLECTION) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new CustomId(), '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.') + ->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.') + ->param('permission', null, new WhiteList(['document', 'collection']), 'Specifies the permissions model used in this collection, which accepts either \'collection\' or \'document\'. For \'collection\' level permission, the permissions specified in read and write params are applied to all documents in the collection. For \'document\' level permissions, read and write permissions are specified in each document. [learn more about permissions](https://appwrite.io/docs/permissions) and get a full list of available permissions.') + ->param('read', null, new Permissions(), '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.') + ->param('write', null, new Permissions(), '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.') + ->inject('response') + ->inject('dbForProject') + ->inject('audits') + ->inject('usage') + ->inject('events') + ->action(function (string $databaseId, string $collectionId, string $name, ?string $permission, ?array $read, ?array $write, Response $response, Database $dbForProject, EventAudit $audits, Stats $usage, Event $events) { + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + $collectionId = $collectionId == 'unique()' ? $dbForProject->getId() : $collectionId; + + try { + $dbForProject->createDocument('database_' . $database->getInternalId(), new Document([ + '$id' => $collectionId, + 'databaseInternalId' => $database->getInternalId(), + 'databaseId' => $databaseId, + '$read' => $read ?? [], // Collection permissions for collection documents (based on permission model) + '$write' => $write ?? [], // Collection permissions for collection documents (based on permission model) + 'permission' => $permission, // Permissions model type (document vs collection) + 'enabled' => true, + 'name' => $name, + 'search' => implode(' ', [$collectionId, $name]), + ])); + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + + $dbForProject->createCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); + } catch (DuplicateException $th) { + throw new Exception('Collection already exists', 409, Exception::COLLECTION_ALREADY_EXISTS); + } catch (LimitException $th) { + throw new Exception('Collection limit exceeded', 400, Exception::COLLECTION_LIMIT_EXCEEDED); + } + + $audits + ->setResource('database/' . $databaseId . '/collection/' . $collectionId) + ->setPayload($collection->getArrayCopy()) + ; + + $events + ->setContext('database', $database) + ->setParam('databaseId', $databaseId) + ->setParam('collectionId', $collection->getId()); + + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.create', 1); + + $response->setStatusCode(Response::STATUS_CODE_CREATED); + $response->dynamic($collection, Response::MODEL_COLLECTION); + }); + +App::get('/v1/databases/:databaseId/collections') + ->desc('List Collections') + ->groups(['api', 'database']) + ->label('scope', 'collections.read') + ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'listCollections') + ->label('sdk.description', '/docs/references/databases/list-collections.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_COLLECTION_LIST) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) + ->param('limit', 25, new Range(0, 100), 'Maximum number of collection to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) + ->param('offset', 0, new Range(0, APP_LIMIT_COUNT), 'Offset value. The default value is 0. Use this param to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)', true) + ->param('cursor', '', new UID(), '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.', true) + ->param('cursorDirection', Database::CURSOR_AFTER, new WhiteList([Database::CURSOR_AFTER, Database::CURSOR_BEFORE]), 'Direction of the cursor.', true) + ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true) + ->inject('response') + ->inject('dbForProject') + ->inject('usage') + ->action(function (string $databaseId, string $search, int $limit, int $offset, string $cursor, string $cursorDirection, string $orderType, Response $response, Database $dbForProject, Stats $usage) { + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + if (!empty($cursor)) { + $cursorCollection = $dbForProject->getDocument('database_' . $database->getInternalId(), $cursor); if ($cursorCollection->isEmpty()) { throw new Exception("Collection '{$cursor}' for the 'cursor' value not found.", 400, Exception::GENERAL_CURSOR_NOT_FOUND); @@ -229,262 +595,64 @@ App::get('/v1/database/collections') $queries[] = new Query('search', Query::TYPE_SEARCH, [$search]); } - $usage->setParam('database.collections.read', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.read', 1); $response->dynamic(new Document([ - 'collections' => $dbForProject->find('collections', $queries, $limit, $offset, [], [$orderType], $cursorCollection ?? null, $cursorDirection), - 'total' => $dbForProject->count('collections', $queries, APP_LIMIT_COUNT), + 'collections' => $dbForProject->find('database_' . $database->getInternalId(), $queries, $limit, $offset, [], [$orderType], $cursorCollection ?? null, $cursorDirection), + 'total' => $dbForProject->count('database_' . $database->getInternalId(), $queries, APP_LIMIT_COUNT), ]), Response::MODEL_COLLECTION_LIST); }); -App::get('/v1/database/collections/:collectionId') +App::get('/v1/databases/:databaseId/collections/:collectionId') ->desc('Get Collection') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getCollection') - ->label('sdk.description', '/docs/references/database/get-collection.md') + ->label('sdk.description', '/docs/references/databases/get-collection.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_COLLECTION) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function (string $collectionId, Response $response, Database $dbForProject, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, Stats $usage) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); } - $usage->setParam('database.collections.read', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.read', 1); $response->dynamic($collection, Response::MODEL_COLLECTION); }); -App::get('/v1/database/usage') - ->desc('Get usage stats for the database') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'database') - ->label('sdk.method', 'getUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_DATABASE) - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) - ->inject('response') - ->inject('dbForProject') - ->action(function (string $range, Response $response, Database $dbForProject) { - - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '30m', - 'limit' => 48, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; - - $metrics = [ - 'database.documents.count', - 'database.collections.count', - 'database.collections.create', - 'database.collections.read', - 'database.collections.update', - 'database.collections.delete', - 'database.documents.create', - 'database.documents.read', - 'database.documents.update', - 'database.documents.delete' - ]; - - $stats = []; - - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; - - $requestDocs = $dbForProject->find('stats', [ - new Query('period', Query::TYPE_EQUAL, [$period]), - new Query('metric', Query::TYPE_EQUAL, [$metric]), - ], $limit, 0, ['time'], [Database::ORDER_DESC]); - - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } - - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '30m' => 1800, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => ($stats[$metric][$last]['date'] ?? \time()) - $diff, // time of last metric minus period - ]; - $backfill--; - } - // TODO@kodumbeats explore performance if query is ordered by time ASC - $stats[$metric] = array_reverse($stats[$metric]); - } - }); - - $usage = new Document([ - 'range' => $range, - 'documentsCount' => $stats["database.documents.count"], - 'collectionsCount' => $stats["database.collections.count"], - 'documentsCreate' => $stats["database.documents.create"], - 'documentsRead' => $stats["database.documents.read"], - 'documentsUpdate' => $stats["database.documents.update"], - 'documentsDelete' => $stats["database.documents.delete"], - 'collectionsCreate' => $stats["database.collections.create"], - 'collectionsRead' => $stats["database.collections.read"], - 'collectionsUpdate' => $stats["database.collections.update"], - 'collectionsDelete' => $stats["database.collections.delete"], - ]); - } - - $response->dynamic($usage, Response::MODEL_USAGE_DATABASE); - }); - -App::get('/v1/database/:collectionId/usage') - ->desc('Get usage stats for a collection') - ->groups(['api', 'database']) - ->label('scope', 'collections.read') - ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'database') - ->label('sdk.method', 'getCollectionUsage') - ->label('sdk.response.code', Response::STATUS_CODE_OK) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_USAGE_COLLECTION) - ->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) - ->param('collectionId', '', new UID(), 'Collection ID.') - ->inject('response') - ->inject('dbForProject') - ->action(function (string $range, string $collectionId, Response $response, Database $dbForProject) { - - $collectionDocument = $dbForProject->getDocument('collections', $collectionId); - $collection = $dbForProject->getCollection('collection_' . $collectionDocument->getInternalId()); - - if ($collection->isEmpty()) { - throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); - } - - $usage = []; - if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { - $periods = [ - '24h' => [ - 'period' => '30m', - 'limit' => 48, - ], - '7d' => [ - 'period' => '1d', - 'limit' => 7, - ], - '30d' => [ - 'period' => '1d', - 'limit' => 30, - ], - '90d' => [ - 'period' => '1d', - 'limit' => 90, - ], - ]; - - $metrics = [ - "database.collections.$collectionId.documents.count", - "database.collections.$collectionId.documents.create", - "database.collections.$collectionId.documents.read", - "database.collections.$collectionId.documents.update", - "database.collections.$collectionId.documents.delete", - ]; - - $stats = []; - - Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { - foreach ($metrics as $metric) { - $limit = $periods[$range]['limit']; - $period = $periods[$range]['period']; - - $requestDocs = $dbForProject->find('stats', [ - new Query('period', Query::TYPE_EQUAL, [$period]), - new Query('metric', Query::TYPE_EQUAL, [$metric]), - ], $limit, 0, ['time'], [Database::ORDER_DESC]); - - $stats[$metric] = []; - foreach ($requestDocs as $requestDoc) { - $stats[$metric][] = [ - 'value' => $requestDoc->getAttribute('value'), - 'date' => $requestDoc->getAttribute('time'), - ]; - } - - // backfill metrics with empty values for graphs - $backfill = $limit - \count($requestDocs); - while ($backfill > 0) { - $last = $limit - $backfill - 1; // array index of last added metric - $diff = match ($period) { // convert period to seconds for unix timestamp math - '30m' => 1800, - '1d' => 86400, - }; - $stats[$metric][] = [ - 'value' => 0, - 'date' => ($stats[$metric][$last]['date'] ?? \time()) - $diff, // time of last metric minus period - ]; - $backfill--; - } - $stats[$metric] = array_reverse($stats[$metric]); - } - }); - - $usage = new Document([ - 'range' => $range, - 'documentsCount' => $stats["database.collections.$collectionId.documents.count"], - 'documentsCreate' => $stats["database.collections.$collectionId.documents.create"], - 'documentsRead' => $stats["database.collections.$collectionId.documents.read"], - 'documentsUpdate' => $stats["database.collections.$collectionId.documents.update"], - 'documentsDelete' => $stats["database.collections.$collectionId.documents.delete"] - ]); - } - - $response->dynamic($usage, Response::MODEL_USAGE_COLLECTION); - }); - -App::get('/v1/database/collections/:collectionId/logs') +App::get('/v1/databases/:databaseId/collections/:collectionId/logs') ->desc('List Collection Logs') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listCollectionLogs') - ->label('sdk.description', '/docs/references/database/get-collection-logs.md') + ->label('sdk.description', '/docs/references/databases/get-collection-logs.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_LOG_LIST) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->param('limit', 25, new Range(0, 100), 'Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, APP_LIMIT_COUNT), 'Offset value. The default value is 0. Use this value to manage pagination. [learn more about pagination](https://appwrite.io/docs/pagination)', true) @@ -492,17 +660,22 @@ App::get('/v1/database/collections/:collectionId/logs') ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->action(function (string $collectionId, int $limit, int $offset, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { + ->action(function (string $databaseId, string $collectionId, int $limit, int $offset, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { - $collectionDocument = $dbForProject->getDocument('collections', $collectionId); - $collection = $dbForProject->getCollection('collection_' . $collectionDocument->getInternalId()); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); } $audit = new Audit($dbForProject); - $resource = 'collection/' . $collectionId; + $resource = 'database/' . $databaseId . '/collection/' . $collectionId; $logs = $audit->getLogsByResource($resource, $limit, $offset); $output = []; @@ -556,18 +729,20 @@ App::get('/v1/database/collections/:collectionId/logs') ]), Response::MODEL_LOG_LIST); }); -App::put('/v1/database/collections/:collectionId') + +App::put('/v1/databases/:databaseId/collections/:collectionId') ->desc('Update Collection') ->groups(['api', 'database']) ->label('scope', 'collections.write') - ->label('event', 'collections.[collectionId].update') + ->label('event', 'databases.[databaseId].collections.[collectionId].update') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateCollection') - ->label('sdk.description', '/docs/references/database/update-collection.md') + ->label('sdk.description', '/docs/references/databases/update-collection.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_COLLECTION) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->param('name', null, new Text(128), 'Collection name. Max length: 128 chars.') ->param('permission', null, new WhiteList(['document', 'collection']), '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.') @@ -579,9 +754,14 @@ App::put('/v1/database/collections/:collectionId') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $name, string $permission, ?array $read, ?array $write, bool $enabled, Response $response, Database $dbForProject, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $name, string $permission, ?array $read, ?array $write, bool $enabled, Response $response, Database $dbForProject, EventAudit $audits, Stats $usage, Event $events) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); @@ -592,7 +772,7 @@ App::put('/v1/database/collections/:collectionId') $enabled ??= $collection->getAttribute('enabled', true); try { - $collection = $dbForProject->updateDocument('collections', $collectionId, $collection + $collection = $dbForProject->updateDocument('database_' . $database->getInternalId(), $collectionId, $collection ->setAttribute('$write', $write) ->setAttribute('$read', $read) ->setAttribute('name', $name) @@ -606,27 +786,34 @@ App::put('/v1/database/collections/:collectionId') } $audits - ->setResource('collection/' . $collectionId) + ->setResource('database/' . $databaseId . '/collection/' . $collectionId) ->setPayload($collection->getArrayCopy()) ; - $usage->setParam('database.collections.update', 1); - $events->setParam('collectionId', $collection->getId()); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.update', 1); + + $events + ->setContext('database', $database) + ->setParam('databaseId', $databaseId) + ->setParam('collectionId', $collection->getId()); $response->dynamic($collection, Response::MODEL_COLLECTION); }); -App::delete('/v1/database/collections/:collectionId') +App::delete('/v1/databases/:databaseId/collections/:collectionId') ->desc('Delete Collection') ->groups(['api', 'database']) ->label('scope', 'collections.write') - ->label('event', 'collections.[collectionId].delete') + ->label('event', 'databases.[databaseId].collections.[collectionId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteCollection') - ->label('sdk.description', '/docs/references/database/delete-collection.md') + ->label('sdk.description', '/docs/references/databases/delete-collection.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->inject('response') ->inject('dbForProject') @@ -634,19 +821,25 @@ App::delete('/v1/database/collections/:collectionId') ->inject('audits') ->inject('deletes') ->inject('usage') - ->action(function (string $collectionId, Response $response, Database $dbForProject, Event $events, EventAudit $audits, Delete $deletes, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, Event $events, EventAudit $audits, Delete $deletes, Stats $usage) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); } - if (!$dbForProject->deleteDocument('collections', $collectionId)) { + if (!$dbForProject->deleteDocument('database_' . $database->getInternalId(), $collectionId)) { throw new Exception('Failed to remove collection from DB', 500, Exception::GENERAL_SERVER_ERROR); } - $dbForProject->deleteCachedCollection('collection_' . $collection->getInternalId()); + $dbForProject->deleteCachedCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId()); $deletes ->setType(DELETE_TYPE_DOCUMENT) @@ -654,32 +847,37 @@ App::delete('/v1/database/collections/:collectionId') ; $events + ->setContext('database', $database) + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) ->setPayload($response->output($collection, Response::MODEL_COLLECTION)) ; $audits - ->setResource('collection/' . $collectionId) + ->setResource('database/' . $databaseId . '/collection/' . $collectionId) ->setPayload($collection->getArrayCopy()) ; - $usage->setParam('database.collections.delete', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.delete', 1); $response->noContent(); }); -App::post('/v1/database/collections/:collectionId/attributes/string') +App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/string') ->desc('Create String Attribute') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createStringAttribute') - ->label('sdk.description', '/docs/references/database/create-string-attribute.md') + ->label('sdk.description', '/docs/references/databases/create-string-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_STRING) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('size', null, new Range(1, APP_DATABASE_ATTRIBUTE_STRING_MAX_LENGTH, Range::TYPE_INTEGER), 'Attribute size for text attributes, in number of characters.') @@ -692,7 +890,7 @@ App::post('/v1/database/collections/:collectionId/attributes/string') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, ?int $size, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { // Ensure attribute default is within required size $validator = new Text($size); @@ -700,7 +898,7 @@ App::post('/v1/database/collections/:collectionId/attributes/string') throw new Exception($validator->getDescription(), 400, Exception::ATTRIBUTE_VALUE_INVALID); } - $attribute = createAttribute($collectionId, new Document([ + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => $size, @@ -712,18 +910,19 @@ App::post('/v1/database/collections/:collectionId/attributes/string') $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING); }); -App::post('/v1/database/collections/:collectionId/attributes/email') +App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/email') ->desc('Create Email Attribute') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createEmailAttribute') - ->label('sdk.description', '/docs/references/database/create-email-attribute.md') + ->label('sdk.description', '/docs/references/databases/create-email-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_EMAIL) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') @@ -735,9 +934,9 @@ App::post('/v1/database/collections/:collectionId/attributes/email') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, Event $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { - $attribute = createAttribute($collectionId, new Document([ + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => 254, @@ -750,18 +949,19 @@ App::post('/v1/database/collections/:collectionId/attributes/email') $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_EMAIL); }); -App::post('/v1/database/collections/:collectionId/attributes/enum') +App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/enum') ->desc('Create Enum Attribute') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createEnumAttribute') - ->label('sdk.description', '/docs/references/database/create-attribute-enum.md') + ->label('sdk.description', '/docs/references/databases/create-attribute-enum.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_ENUM) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('elements', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' elements are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.') @@ -774,7 +974,7 @@ App::post('/v1/database/collections/:collectionId/attributes/enum') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $key, array $elements, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, array $elements, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { // use length of longest string as attribute size $size = 0; @@ -790,7 +990,7 @@ App::post('/v1/database/collections/:collectionId/attributes/enum') throw new Exception('Default value not found in elements', 400, Exception::ATTRIBUTE_VALUE_INVALID); } - $attribute = createAttribute($collectionId, new Document([ + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => $size, @@ -804,18 +1004,19 @@ App::post('/v1/database/collections/:collectionId/attributes/enum') $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_ENUM); }); -App::post('/v1/database/collections/:collectionId/attributes/ip') +App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/ip') ->desc('Create IP Address Attribute') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createIpAttribute') - ->label('sdk.description', '/docs/references/database/create-ip-attribute.md') + ->label('sdk.description', '/docs/references/databases/create-ip-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_IP) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') @@ -827,9 +1028,9 @@ App::post('/v1/database/collections/:collectionId/attributes/ip') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { - $attribute = createAttribute($collectionId, new Document([ + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => 39, @@ -842,18 +1043,19 @@ App::post('/v1/database/collections/:collectionId/attributes/ip') $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_IP); }); -App::post('/v1/database/collections/:collectionId/attributes/url') +App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/url') ->desc('Create URL Attribute') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createUrlAttribute') - ->label('sdk.description', '/docs/references/database/create-url-attribute.md') + ->label('sdk.description', '/docs/references/databases/create-url-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_URL) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') @@ -865,9 +1067,9 @@ App::post('/v1/database/collections/:collectionId/attributes/url') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?string $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { - $attribute = createAttribute($collectionId, new Document([ + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_STRING, 'size' => 2000, @@ -880,18 +1082,19 @@ App::post('/v1/database/collections/:collectionId/attributes/url') $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_URL); }); -App::post('/v1/database/collections/:collectionId/attributes/integer') +App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/integer') ->desc('Create Integer Attribute') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createIntegerAttribute') - ->label('sdk.description', '/docs/references/database/create-integer-attribute.md') + ->label('sdk.description', '/docs/references/databases/create-integer-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_INTEGER) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') @@ -905,7 +1108,7 @@ App::post('/v1/database/collections/:collectionId/attributes/integer') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?int $min, ?int $max, ?int $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { // Ensure attribute default is within range $min = (is_null($min)) ? PHP_INT_MIN : \intval($min); @@ -923,7 +1126,7 @@ App::post('/v1/database/collections/:collectionId/attributes/integer') $size = $max > 2147483647 ? 8 : 4; // Automatically create BigInt depending on max value - $attribute = createAttribute($collectionId, new Document([ + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_INTEGER, 'size' => $size, @@ -947,18 +1150,19 @@ App::post('/v1/database/collections/:collectionId/attributes/integer') $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_INTEGER); }); -App::post('/v1/database/collections/:collectionId/attributes/float') +App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/float') ->desc('Create Float Attribute') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createFloatAttribute') - ->label('sdk.description', '/docs/references/database/create-float-attribute.md') + ->label('sdk.description', '/docs/references/databases/create-float-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_FLOAT) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') @@ -972,7 +1176,7 @@ App::post('/v1/database/collections/:collectionId/attributes/float') ->inject('audits') ->inject('events') ->inject('usage') - ->action(function (string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Event $events, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?float $min, ?float $max, ?float $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Event $events, Stats $usage) { // Ensure attribute default is within range $min = (is_null($min)) ? -PHP_FLOAT_MAX : \floatval($min); @@ -993,7 +1197,7 @@ App::post('/v1/database/collections/:collectionId/attributes/float') throw new Exception($validator->getDescription(), 400, Exception::ATTRIBUTE_VALUE_INVALID); } - $attribute = createAttribute($collectionId, new Document([ + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_FLOAT, 'required' => $required, @@ -1017,18 +1221,19 @@ App::post('/v1/database/collections/:collectionId/attributes/float') $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_FLOAT); }); -App::post('/v1/database/collections/:collectionId/attributes/boolean') +App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/boolean') ->desc('Create Boolean Attribute') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].attributes.[attributeId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].create') ->label('scope', 'collections.write') - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) ->label('sdk.method', 'createBooleanAttribute') - ->label('sdk.description', '/docs/references/database/create-boolean-attribute.md') + ->label('sdk.description', '/docs/references/databases/create-boolean-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_BOOLEAN) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->param('required', null, new Boolean(), 'Is attribute required?') @@ -1040,9 +1245,9 @@ App::post('/v1/database/collections/:collectionId/attributes/boolean') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $key, ?bool $required, ?bool $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, ?bool $required, ?bool $default, bool $array, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { - $attribute = createAttribute($collectionId, new Document([ + $attribute = createAttribute($databaseId, $collectionId, new Document([ 'key' => $key, 'type' => Database::VAR_BOOLEAN, 'size' => 0, @@ -1054,24 +1259,30 @@ App::post('/v1/database/collections/:collectionId/attributes/boolean') $response->dynamic($attribute, Response::MODEL_ATTRIBUTE_BOOLEAN); }); -App::get('/v1/database/collections/:collectionId/attributes') +App::get('/v1/databases/:databaseId/collections/:collectionId/attributes') ->desc('List Attributes') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listAttributes') - ->label('sdk.description', '/docs/references/database/list-attributes.md') + ->label('sdk.description', '/docs/references/databases/list-attributes.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_ATTRIBUTE_LIST) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function (string $collectionId, Response $response, Database $dbForProject, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, Stats $usage) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); @@ -1079,7 +1290,9 @@ App::get('/v1/database/collections/:collectionId/attributes') $attributes = $collection->getAttribute('attributes'); - $usage->setParam('database.collections.read', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.read', 1); $response->dynamic(new Document([ 'total' => \count($attributes), @@ -1087,14 +1300,14 @@ App::get('/v1/database/collections/:collectionId/attributes') ]), Response::MODEL_ATTRIBUTE_LIST); }); -App::get('/v1/database/collections/:collectionId/attributes/:key') +App::get('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') ->desc('Get Attribute') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getAttribute') - ->label('sdk.description', '/docs/references/database/get-attribute.md') + ->label('sdk.description', '/docs/references/databases/get-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', [ @@ -1106,20 +1319,27 @@ App::get('/v1/database/collections/:collectionId/attributes/:key') Response::MODEL_ATTRIBUTE_URL, Response::MODEL_ATTRIBUTE_IP, Response::MODEL_ATTRIBUTE_STRING,])// needs to be last, since its condition would dominate any other string attribute + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function (string $collectionId, string $key, Response $response, Database $dbForProject, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject, Stats $usage) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); } - $attribute = $dbForProject->getDocument('attributes', $collection->getInternalId() . '_' . $key); + $attribute = $dbForProject->getDocument('attributes', $database->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); if ($attribute->isEmpty()) { throw new Exception('Attribute not found', 404, Exception::ATTRIBUTE_NOT_FOUND); @@ -1143,22 +1363,25 @@ App::get('/v1/database/collections/:collectionId/attributes/:key') default => Response::MODEL_ATTRIBUTE, }; - $usage->setParam('database.collections.read', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.read', 1); $response->dynamic($attribute, $model); }); -App::delete('/v1/database/collections/:collectionId/attributes/:key') +App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key') ->desc('Delete Attribute') ->groups(['api', 'database']) ->label('scope', 'collections.write') - ->label('event', 'collections.[collectionId].attributes.[attributeId].delete') + ->label('event', 'databases.[databaseId].collections.[collectionId].attributes.[attributeId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteAttribute') - ->label('sdk.description', '/docs/references/database/delete-attribute.md') + ->label('sdk.description', '/docs/references/databases/delete-attribute.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Attribute Key.') ->inject('response') @@ -1167,15 +1390,20 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key') ->inject('events') ->inject('audits') ->inject('usage') - ->action(function (string $collectionId, string $key, Response $response, Database $dbForProject, EventDatabase $database, Event $events, EventAudit $audits, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject, EventDatabase $database, Event $events, EventAudit $audits, Stats $usage) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); } - $attribute = $dbForProject->getDocument('attributes', $collection->getInternalId() . '_' . $key); + $attribute = $dbForProject->getDocument('attributes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); if ($attribute->isEmpty()) { throw new Exception('Attribute not found', 404, Exception::ATTRIBUTE_NOT_FOUND); @@ -1186,16 +1414,19 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key') $attribute = $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'deleting')); } - $dbForProject->deleteCachedDocument('collections', $collectionId); - $dbForProject->deleteCachedCollection('collection_' . $collection->getInternalId()); + $dbForProject->deleteCachedDocument('database_' . $db->getInternalId(), $collectionId); + $dbForProject->deleteCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId()); $database ->setType(DATABASE_TYPE_DELETE_ATTRIBUTE) ->setCollection($collection) + ->setDatabase($db) ->setDocument($attribute) ; - $usage->setParam('database.collections.update', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.update', 1); // Select response model based on type and format $type = $attribute->getAttribute('type'); @@ -1216,32 +1447,35 @@ App::delete('/v1/database/collections/:collectionId/attributes/:key') }; $events + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) ->setParam('attributeId', $attribute->getId()) - ->setContext($collection) + ->setContext('collection', $collection) + ->setContext('database', $db) ->setPayload($response->output($attribute, $model)) ; $audits - ->setResource('collection/' . $collectionId) + ->setResource('database/' . $databaseId . '/collection/' . $collectionId) ->setPayload($attribute->getArrayCopy()) ; $response->noContent(); }); -App::post('/v1/database/collections/:collectionId/indexes') +App::post('/v1/databases/:databaseId/collections/:collectionId/indexes') ->desc('Create Index') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].indexes.[indexId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].create') ->label('scope', 'collections.write') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createIndex') - ->label('sdk.description', '/docs/references/database/create-index.md') + ->label('sdk.description', '/docs/references/databases/create-index.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_INDEX) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', null, new Key(), 'Index Key.') ->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE, Database::INDEX_SPATIAL, Database::INDEX_ARRAY]), 'Index type.') @@ -1253,17 +1487,23 @@ App::post('/v1/database/collections/:collectionId/indexes') ->inject('audits') ->inject('usage') ->inject('events') - ->action(function (string $collectionId, string $key, string $type, array $attributes, array $orders, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { + ->action(function (string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, Response $response, Database $dbForProject, EventDatabase $database, EventAudit $audits, Stats $usage, Event $events) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); } $count = $dbForProject->count('indexes', [ - new Query('collectionInternalId', Query::TYPE_EQUAL, [$collection->getInternalId()]) - ]); + new Query('collectionInternalId', Query::TYPE_EQUAL, [$collection->getInternalId()]), + new Query('databaseInternalId', Query::TYPE_EQUAL, [$db->getInternalId()]) + ], 61); $limit = 64 - MariaDB::getNumberOfDefaultIndexes(); @@ -1300,9 +1540,11 @@ App::post('/v1/database/collections/:collectionId/indexes') try { $index = $dbForProject->createDocument('indexes', new Document([ - '$id' => $collection->getInternalId() . '_' . $key, + '$id' => $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key, 'key' => $key, 'status' => 'processing', // processing, available, failed, deleting, stuck + 'databaseInternalId' => $db->getInternalId(), + 'databaseId' => $databaseId, 'collectionInternalId' => $collection->getInternalId(), 'collectionId' => $collectionId, 'type' => $type, @@ -1314,24 +1556,29 @@ App::post('/v1/database/collections/:collectionId/indexes') throw new Exception('Index already exists', 409, Exception::INDEX_ALREADY_EXISTS); } - $dbForProject->deleteCachedDocument('collections', $collectionId); + $dbForProject->deleteCachedDocument('database_' . $db->getInternalId(), $collectionId); $database ->setType(DATABASE_TYPE_CREATE_INDEX) + ->setDatabase($db) ->setCollection($collection) ->setDocument($index) ; - $usage->setParam('database.collections.update', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.update', 1); $events + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) ->setParam('indexId', $index->getId()) - ->setContext($collection) + ->setContext('collection', $collection) + ->setContext('database', $db) ; $audits - ->setResource('collection/' . $collection->getId()) + ->setResource('database/' . $databaseId . '/collection/' . $collection->getId()) ->setPayload($index->getArrayCopy()) ; @@ -1339,24 +1586,30 @@ App::post('/v1/database/collections/:collectionId/indexes') $response->dynamic($index, Response::MODEL_INDEX); }); -App::get('/v1/database/collections/:collectionId/indexes') +App::get('/v1/databases/:databaseId/collections/:collectionId/indexes') ->desc('List Indexes') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listIndexes') - ->label('sdk.description', '/docs/references/database/list-indexes.md') + ->label('sdk.description', '/docs/references/databases/list-indexes.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_INDEX_LIST) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function (string $collectionId, Response $response, Database $dbForProject, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, Response $response, Database $dbForProject, Stats $usage) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); @@ -1364,7 +1617,9 @@ App::get('/v1/database/collections/:collectionId/indexes') $indexes = $collection->getAttribute('indexes'); - $usage->setParam('database.collections.read', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.read', 1); $response->dynamic(new Document([ 'total' => \count($indexes), @@ -1372,25 +1627,31 @@ App::get('/v1/database/collections/:collectionId/indexes') ]), Response::MODEL_INDEX_LIST); }); -App::get('/v1/database/collections/:collectionId/indexes/:key') +App::get('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->desc('Get Index') ->groups(['api', 'database']) ->label('scope', 'collections.read') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getIndex') - ->label('sdk.description', '/docs/references/database/get-index.md') + ->label('sdk.description', '/docs/references/databases/get-index.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_INDEX) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', null, new Key(), 'Index Key.') ->inject('response') ->inject('dbForProject') ->inject('usage') - ->action(function (string $collectionId, string $key, Response $response, Database $dbForProject, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject, Stats $usage) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); @@ -1406,25 +1667,28 @@ App::get('/v1/database/collections/:collectionId/indexes/:key') } $index = new Document([\array_merge($indexes[$indexIndex], [ - 'collectionId' => $collectionId, + 'collectionId' => $database->getInternalId() . '_' . $collectionId, ])]); - $usage->setParam('database.collections.read', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.read', 1); $response->dynamic($index, Response::MODEL_INDEX); }); -App::delete('/v1/database/collections/:collectionId/indexes/:key') +App::delete('/v1/databases/:databaseId/collections/:collectionId/indexes/:key') ->desc('Delete Index') ->groups(['api', 'database']) ->label('scope', 'collections.write') - ->label('event', 'collections.[collectionId].indexes.[indexId].delete') + ->label('event', 'databases.[databaseId].collections.[collectionId].indexes.[indexId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_KEY]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteIndex') - ->label('sdk.description', '/docs/references/database/delete-index.md') + ->label('sdk.description', '/docs/references/databases/delete-index.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('key', '', new Key(), 'Index Key.') ->inject('response') @@ -1433,15 +1697,20 @@ App::delete('/v1/database/collections/:collectionId/indexes/:key') ->inject('events') ->inject('audits') ->inject('usage') - ->action(function (string $collectionId, string $key, Response $response, Database $dbForProject, EventDatabase $database, Event $events, EventAudit $audits, Stats $usage) { + ->action(function (string $databaseId, string $collectionId, string $key, Response $response, Database $dbForProject, EventDatabase $database, Event $events, EventAudit $audits, Stats $usage) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($db->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $db->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); } - $index = $dbForProject->getDocument('indexes', $collection->getInternalId() . '_' . $key); + $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); if (empty($index->getId())) { throw new Exception('Index not found', 404, Exception::INDEX_NOT_FOUND); @@ -1452,43 +1721,49 @@ App::delete('/v1/database/collections/:collectionId/indexes/:key') $index = $dbForProject->updateDocument('indexes', $index->getId(), $index->setAttribute('status', 'deleting')); } - $dbForProject->deleteCachedDocument('collections', $collectionId); + $dbForProject->deleteCachedDocument('database_' . $db->getInternalId(), $collectionId); $database ->setType(DATABASE_TYPE_DELETE_INDEX) + ->setDatabase($db) ->setCollection($collection) ->setDocument($index) ; - $usage->setParam('database.collections.update', 1); + $usage + ->setParam('databaseId', $databaseId) + ->setParam('databases.collections.update', 1); $events + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) ->setParam('indexId', $index->getId()) - ->setContext($collection) + ->setContext('collection', $collection) + ->setContext('database', $db) ->setPayload($response->output($index, Response::MODEL_INDEX)) ; $audits - ->setResource('collection/' . $collection->getId()) + ->setResource('database/' . $databaseId . '/collection/' . $collection->getId()) ->setPayload($index->getArrayCopy()) ; $response->noContent(); }); -App::post('/v1/database/collections/:collectionId/documents') +App::post('/v1/databases/:databaseId/collections/:collectionId/documents') ->desc('Create Document') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].documents.[documentId].create') + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') ->label('scope', 'documents.write') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'createDocument') - ->label('sdk.description', '/docs/references/database/create-document.md') + ->label('sdk.description', '/docs/references/databases/create-document.md') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_DOCUMENT) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('documentId', '', new CustomId(), '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.') ->param('collectionId', null, new UID(), '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.') ->param('data', [], new JSON(), 'Document data as JSON object.') @@ -1501,8 +1776,13 @@ App::post('/v1/database/collections/:collectionId/documents') ->inject('usage') ->inject('events') ->inject('mode') - ->action(function (string $documentId, string $collectionId, string|array $data, ?array $read, ?array $write, Response $response, Database $dbForProject, Document $user, EventAudit $audits, Stats $usage, Event $events, string $mode) { + ->action(function (string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $read, ?array $write, Response $response, Database $dbForProject, Document $user, EventAudit $audits, Stats $usage, Event $events, string $mode) { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array if (empty($data)) { @@ -1518,7 +1798,7 @@ App::post('/v1/database/collections/:collectionId/documents') * * @var Document $collection */ - $collection = Authorization::skip(fn() => $dbForProject->getDocument('collections', $collectionId)); + $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { @@ -1559,9 +1839,9 @@ App::post('/v1/database/collections/:collectionId/documents') try { if ($collection->getAttribute('permission') === 'collection') { /** @var Document $document */ - $document = Authorization::skip(fn() => $dbForProject->createDocument('collection_' . $collection->getInternalId(), new Document($data))); + $document = Authorization::skip(fn() => $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), new Document($data))); } else { - $document = $dbForProject->createDocument('collection_' . $collection->getInternalId(), new Document($data)); + $document = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), new Document($data)); } $document->setAttribute('$collection', $collectionId); } catch (StructureException $exception) { @@ -1571,18 +1851,21 @@ App::post('/v1/database/collections/:collectionId/documents') } $events + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) ->setParam('documentId', $document->getId()) - ->setContext($collection) + ->setContext('collection', $collection) + ->setContext('database', $database) ; $usage - ->setParam('database.documents.create', 1) + ->setParam('databases.documents.create', 1) + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collectionId) ; $audits - ->setResource('document/' . $document->getId()) + ->setResource('database/' . $databaseId . '/collection/' . $collectionId . '/document/' . $document->getId()) ->setPayload($document->getArrayCopy()) ; @@ -1590,17 +1873,18 @@ App::post('/v1/database/collections/:collectionId/documents') $response->dynamic($document, Response::MODEL_DOCUMENT); }); -App::get('/v1/database/collections/:collectionId/documents') +App::get('/v1/databases/:databaseId/collections/:collectionId/documents') ->desc('List Documents') ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listDocuments') - ->label('sdk.description', '/docs/references/database/list-documents.md') + ->label('sdk.description', '/docs/references/databases/list-documents.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_DOCUMENT_LIST) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/database#querying-documents). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) ->param('limit', 25, new Range(0, 100), 'Maximum number of documents to return in response. By default will return maximum 25 results. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' results allowed per request.', true) @@ -1613,14 +1897,19 @@ App::get('/v1/database/collections/:collectionId/documents') ->inject('dbForProject') ->inject('usage') ->inject('mode') - ->action(function (string $collectionId, array $queries, int $limit, int $offset, string $cursor, string $cursorDirection, array $orderAttributes, array $orderTypes, Response $response, Database $dbForProject, Stats $usage, string $mode) { + ->action(function (string $databaseId, string $collectionId, array $queries, int $limit, int $offset, string $cursor, string $cursorDirection, array $orderAttributes, array $orderTypes, Response $response, Database $dbForProject, Stats $usage, string $mode) { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } /** * Skip Authorization to get the collection. Needed in case of empty permissions for document level permissions. * * @var Utopia\Database\Document $collection */ - $collection = Authorization::skip(fn() => $dbForProject->getDocument('collections', $collectionId)); + $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { @@ -1663,8 +1952,8 @@ App::get('/v1/database/collections/:collectionId/documents') $cursorDocument = null; if (!empty($cursor)) { $cursorDocument = $collection->getAttribute('permission') === 'collection' - ? Authorization::skip(fn () => $dbForProject->getDocument('collection_' . $collection->getInternalId(), $cursor)) - : $dbForProject->getDocument('collection_' . $collection->getInternalId(), $cursor); + ? Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $cursor)) + : $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $cursor); if ($cursorDocument->isEmpty()) { throw new Exception("Document '{$cursor}' for the 'cursor' value not found.", 400, Exception::GENERAL_CURSOR_NOT_FOUND); @@ -1673,11 +1962,11 @@ App::get('/v1/database/collections/:collectionId/documents') if ($collection->getAttribute('permission') === 'collection') { /** @var Document[] $documents */ - $documents = Authorization::skip(fn() => $dbForProject->find('collection_' . $collection->getInternalId(), $queries, $limit, $offset, $orderAttributes, $orderTypes, $cursorDocument ?? null, $cursorDirection)); - $total = Authorization::skip(fn() => $dbForProject->count('collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT)); + $documents = Authorization::skip(fn() => $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, $limit, $offset, $orderAttributes, $orderTypes, $cursorDocument ?? null, $cursorDirection)); + $total = Authorization::skip(fn() => $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT)); } else { - $documents = $dbForProject->find('collection_' . $collection->getInternalId(), $queries, $limit, $offset, $orderAttributes, $orderTypes, $cursorDocument ?? null, $cursorDirection); - $total = $dbForProject->count('collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT); + $documents = $dbForProject->find('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, $limit, $offset, $orderAttributes, $orderTypes, $cursorDocument ?? null, $cursorDirection); + $total = $dbForProject->count('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $queries, APP_LIMIT_COUNT); } /** @@ -1686,7 +1975,8 @@ App::get('/v1/database/collections/:collectionId/documents') $documents = array_map(fn(Document $document) => $document->setAttribute('$collection', $collectionId), $documents); $usage - ->setParam('database.documents.read', 1) + ->setParam('databases.documents.read', 1) + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collectionId) ; @@ -1696,29 +1986,35 @@ App::get('/v1/database/collections/:collectionId/documents') ]), Response::MODEL_DOCUMENT_LIST); }); -App::get('/v1/database/collections/:collectionId/documents/:documentId') +App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') ->desc('Get Document') ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'getDocument') - ->label('sdk.description', '/docs/references/database/get-document.md') + ->label('sdk.description', '/docs/references/databases/get-document.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_DOCUMENT) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('documentId', null, new UID(), 'Document ID.') ->inject('response') ->inject('dbForProject') ->inject('usage') ->inject('mode') - ->action(function (string $collectionId, string $documentId, Response $response, Database $dbForProject, Stats $usage, string $mode) { + ->action(function (string $databaseId, string $collectionId, string $documentId, Response $response, Database $dbForProject, Stats $usage, string $mode) { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } /** * Skip Authorization to get the collection. Needed in case of empty permissions for document level permissions. */ - $collection = Authorization::skip(fn() => $dbForProject->getDocument('collections', $collectionId)); + $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { @@ -1736,9 +2032,9 @@ App::get('/v1/database/collections/:collectionId/documents/:documentId') if ($collection->getAttribute('permission') === 'collection') { /** @var Document $document */ - $document = Authorization::skip(fn() => $dbForProject->getDocument('collection_' . $collection->getInternalId(), $documentId)); + $document = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); } else { - $document = $dbForProject->getDocument('collection_' . $collection->getInternalId(), $documentId); + $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); } /** @@ -1751,24 +2047,26 @@ App::get('/v1/database/collections/:collectionId/documents/:documentId') } $usage - ->setParam('database.documents.read', 1) + ->setParam('databases.documents.read', 1) + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collectionId) ; $response->dynamic($document, Response::MODEL_DOCUMENT); }); -App::get('/v1/database/collections/:collectionId/documents/:documentId/logs') +App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId/logs') ->desc('List Document Logs') ->groups(['api', 'database']) ->label('scope', 'documents.read') ->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'listDocumentLogs') - ->label('sdk.description', '/docs/references/database/get-document-logs.md') + ->label('sdk.description', '/docs/references/databases/get-document-logs.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_LOG_LIST) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', '', new UID(), 'Collection ID.') ->param('documentId', null, new UID(), 'Document ID.') ->param('limit', 25, new Range(0, 100), 'Maximum number of logs to return in response. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) @@ -1777,22 +2075,27 @@ App::get('/v1/database/collections/:collectionId/documents/:documentId/logs') ->inject('dbForProject') ->inject('locale') ->inject('geodb') - ->action(function (string $collectionId, string $documentId, int $limit, int $offset, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { + ->action(function (string $databaseId, string $collectionId, string $documentId, int $limit, int $offset, Response $response, Database $dbForProject, Locale $locale, Reader $geodb) { - $collection = $dbForProject->getDocument('collections', $collectionId); + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } + $collection = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); if ($collection->isEmpty()) { throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); } - $document = $dbForProject->getDocument('collection_' . $collection->getInternalId(), $documentId); + $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); if ($document->isEmpty()) { throw new Exception('No document found', 404, Exception::DOCUMENT_NOT_FOUND); } $audit = new Audit($dbForProject); - $resource = 'document/' . $document->getId(); + $resource = 'database/' . $databaseId . '/collection/' . $collectionId . '/document/' . $document->getId(); $logs = $audit->getLogsByResource($resource, $limit, $offset); $output = []; @@ -1845,18 +2148,19 @@ App::get('/v1/database/collections/:collectionId/documents/:documentId/logs') ]), Response::MODEL_LOG_LIST); }); -App::patch('/v1/database/collections/:collectionId/documents/:documentId') +App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') ->desc('Update Document') ->groups(['api', 'database']) - ->label('event', 'collections.[collectionId].documents.[documentId].update') + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].update') ->label('scope', 'documents.write') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'updateDocument') - ->label('sdk.description', '/docs/references/database/update-document.md') + ->label('sdk.description', '/docs/references/databases/update-document.md') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_DOCUMENT) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', null, new UID(), 'Collection ID.') ->param('documentId', null, new UID(), 'Document ID.') ->param('data', [], new JSON(), 'Document data as JSON object. Include only attribute and value pairs to be updated.') @@ -1868,12 +2172,17 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId') ->inject('usage') ->inject('events') ->inject('mode') - ->action(function (string $collectionId, string $documentId, string|array $data, ?array $read, ?array $write, Response $response, Database $dbForProject, EventAudit $audits, Stats $usage, Event $events, string $mode) { + ->action(function (string $databaseId, string $collectionId, string $documentId, string|array $data, ?array $read, ?array $write, Response $response, Database $dbForProject, EventAudit $audits, Stats $usage, Event $events, string $mode) { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } /** * Skip Authorization to get the collection. Needed in case of empty permissions for document level permissions. */ - $collection = Authorization::skip(fn() => $dbForProject->getDocument('collections', $collectionId)); + $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { @@ -1888,9 +2197,9 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId') throw new Exception('Unauthorized permissions', 401, Exception::USER_UNAUTHORIZED); } - $document = Authorization::skip(fn() => $dbForProject->getDocument('collection_' . $collection->getInternalId(), $documentId)); + $document = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); } else { - $document = $dbForProject->getDocument('collection_' . $collection->getInternalId(), $documentId); + $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); } @@ -1938,9 +2247,9 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId') try { if ($collection->getAttribute('permission') === 'collection') { /** @var Document $document */ - $document = Authorization::skip(fn() => $dbForProject->updateDocument('collection_' . $collection->getInternalId(), $document->getId(), new Document($data))); + $document = Authorization::skip(fn() => $dbForProject->updateDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $document->getId(), new Document($data))); } else { - $document = $dbForProject->updateDocument('collection_' . $collection->getInternalId(), $document->getId(), new Document($data)); + $document = $dbForProject->updateDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $document->getId(), new Document($data)); } /** * Reset $collection attribute to remove prefix. @@ -1955,35 +2264,39 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId') } $events + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) ->setParam('documentId', $document->getId()) - ->setContext($collection) + ->setContext('collection', $collection) + ->setContext('database', $database) ; $usage - ->setParam('database.documents.update', 1) + ->setParam('databases.documents.update', 1) + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collectionId) ; $audits - ->setResource('document/' . $document->getId()) + ->setResource('database/' . $databaseId . '/collection/' . $collectionId . '/document/' . $document->getId()) ->setPayload($document->getArrayCopy()) ; $response->dynamic($document, Response::MODEL_DOCUMENT); }); -App::delete('/v1/database/collections/:collectionId/documents/:documentId') +App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') ->desc('Delete Document') ->groups(['api', 'database']) ->label('scope', 'documents.write') - ->label('event', 'collections.[collectionId].documents.[documentId].delete') + ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].delete') ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) - ->label('sdk.namespace', 'database') + ->label('sdk.namespace', 'databases') ->label('sdk.method', 'deleteDocument') - ->label('sdk.description', '/docs/references/database/delete-document.md') + ->label('sdk.description', '/docs/references/databases/delete-document.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) + ->param('databaseId', '', new UID(), 'Database ID.') ->param('collectionId', null, new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/database#createCollection).') ->param('documentId', null, new UID(), 'Document ID.') ->inject('response') @@ -1993,12 +2306,17 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId') ->inject('deletes') ->inject('usage') ->inject('mode') - ->action(function (string $collectionId, string $documentId, Response $response, Database $dbForProject, Event $events, EventAudit $audits, Delete $deletes, Stats $usage, string $mode) { + ->action(function (string $databaseId, string $collectionId, string $documentId, Response $response, Database $dbForProject, Event $events, EventAudit $audits, Delete $deletes, Stats $usage, string $mode) { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + if ($database->isEmpty()) { + throw new Exception('Database not found', 404, Exception::DATABASE_NOT_FOUND); + } /** * Skip Authorization to get the collection. Needed in case of empty permissions for document level permissions. */ - $collection = Authorization::skip(fn() => $dbForProject->getDocument('collections', $collectionId)); + $collection = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); if ($collection->isEmpty() || !$collection->getAttribute('enabled')) { if (!($mode === APP_MODE_ADMIN && Auth::isPrivilegedUser(Authorization::getRoles()))) { @@ -2016,9 +2334,9 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId') if ($collection->getAttribute('permission') === 'collection') { /** @var Document $document */ - $document = Authorization::skip(fn() => $dbForProject->getDocument('collection_' . $collection->getInternalId(), $documentId)); + $document = Authorization::skip(fn() => $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); } else { - $document = $dbForProject->getDocument('collection_' . $collection->getInternalId(), $documentId); + $document = $dbForProject->getDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); } if ($document->isEmpty()) { @@ -2026,12 +2344,12 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId') } if ($collection->getAttribute('permission') === 'collection') { - Authorization::skip(fn() => $dbForProject->deleteDocument('collection_' . $collection->getInternalId(), $documentId)); + Authorization::skip(fn() => $dbForProject->deleteDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId)); } else { - $dbForProject->deleteDocument('collection_' . $collection->getInternalId(), $documentId); + $dbForProject->deleteDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); } - $dbForProject->deleteCachedDocument('collection_' . $collection->getInternalId(), $documentId); + $dbForProject->deleteCachedDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $documentId); /** * Reset $collection attribute to remove prefix. @@ -2044,21 +2362,353 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId') ; $usage - ->setParam('database.documents.delete', 1) + ->setParam('databases.documents.delete', 1) + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collectionId) ; $events + ->setParam('databaseId', $databaseId) ->setParam('collectionId', $collection->getId()) ->setParam('documentId', $document->getId()) - ->setContext($collection) + ->setContext('collection', $collection) + ->setContext('database', $database) ->setPayload($response->output($document, Response::MODEL_DOCUMENT)) ; $audits - ->setResource('document/' . $document->getId()) + ->setResource('database/' . $databaseId . '/collection/' . $collectionId . '/document/' . $document->getId()) ->setPayload($document->getArrayCopy()) ; $response->noContent(); }); + +App::get('/v1/databases/usage') +->desc('Get usage stats for the database') +->groups(['api', 'database']) +->label('scope', 'collections.read') +->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) +->label('sdk.namespace', 'databases') +->label('sdk.method', 'getUsage') +->label('sdk.response.code', Response::STATUS_CODE_OK) +->label('sdk.response.type', Response::CONTENT_TYPE_JSON) +->label('sdk.response.model', Response::MODEL_USAGE_DATABASES) +->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), '`Date range.', true) +->inject('response') +->inject('dbForProject') +->action(function (string $range, Response $response, Database $dbForProject) { + + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '30m', + 'limit' => 48, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], + ]; + + $metrics = [ + 'databases.count', + 'databases.documents.count', + 'databases.collections.count', + 'databases.create', + 'databases.read', + 'databases.update', + 'databases.delete', + 'databases.collections.create', + 'databases.collections.read', + 'databases.collections.update', + 'databases.collections.delete', + 'databases.documents.create', + 'databases.documents.read', + 'databases.documents.update', + 'databases.documents.delete' + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + new Query('period', Query::TYPE_EQUAL, [$period]), + new Query('metric', Query::TYPE_EQUAL, [$metric]), + ], $limit, 0, ['time'], [Database::ORDER_DESC]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '30m' => 1800, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => ($stats[$metric][$last]['date'] ?? \time()) - $diff, // time of last metric minus period + ]; + $backfill--; + } + // TODO@kodumbeats explore performance if query is ordered by time ASC + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'databasesCount' => $stats["databases.count"], + 'documentsCount' => $stats["databases.documents.count"], + 'collectionsCount' => $stats["databases.collections.count"], + 'documentsCreate' => $stats["databases.documents.create"], + 'documentsRead' => $stats["databases.documents.read"], + 'documentsUpdate' => $stats["databases.documents.update"], + 'documentsDelete' => $stats["databases.documents.delete"], + 'collectionsCreate' => $stats["databases.collections.create"], + 'collectionsRead' => $stats["databases.collections.read"], + 'collectionsUpdate' => $stats["databases.collections.update"], + 'collectionsDelete' => $stats["databases.collections.delete"], + 'databasesCreate' => $stats["databases.create"], + 'databasesRead' => $stats["databases.read"], + 'databasesUpdate' => $stats["databases.update"], + 'databasesDelete' => $stats["databases.delete"], + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_DATABASES); +}); + +App::get('/v1/databases/:databaseId/usage') +->desc('Get usage stats for the database') +->groups(['api', 'database']) +->label('scope', 'collections.read') +->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) +->label('sdk.namespace', 'databases') +->label('sdk.method', 'getDatabaseUsage') +->label('sdk.response.code', Response::STATUS_CODE_OK) +->label('sdk.response.type', Response::CONTENT_TYPE_JSON) +->label('sdk.response.model', Response::MODEL_USAGE_DATABASE) +->param('databaseId', '', new UID(), 'Database ID.') +->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), '`Date range.', true) +->inject('response') +->inject('dbForProject') +->action(function (string $databaseId, string $range, Response $response, Database $dbForProject) { + + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '30m', + 'limit' => 48, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], + ]; + + $metrics = [ + 'databases.' . $databaseId . '.documents.count', + 'databases.' . $databaseId . '.collections.count', + 'databases.' . $databaseId . '.collections.create', + 'databases.' . $databaseId . '.collections.read', + 'databases.' . $databaseId . '.collections.update', + 'databases.' . $databaseId . '.collections.delete', + 'databases.' . $databaseId . '.documents.create', + 'databases.' . $databaseId . '.documents.read', + 'databases.' . $databaseId . '.documents.update', + 'databases.' . $databaseId . '.documents.delete' + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + new Query('period', Query::TYPE_EQUAL, [$period]), + new Query('metric', Query::TYPE_EQUAL, [$metric]), + ], $limit, 0, ['time'], [Database::ORDER_DESC]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '30m' => 1800, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => ($stats[$metric][$last]['date'] ?? \time()) - $diff, // time of last metric minus period + ]; + $backfill--; + } + // TODO@kodumbeats explore performance if query is ordered by time ASC + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'documentsCount' => $stats["databases.{$databaseId}.documents.count"], + 'collectionsCount' => $stats["databases.{$databaseId}.collections.count"], + 'documentsCreate' => $stats["databases.{$databaseId}.documents.create"], + 'documentsRead' => $stats["databases.{$databaseId}.documents.read"], + 'documentsUpdate' => $stats["databases.{$databaseId}.documents.update"], + 'documentsDelete' => $stats["databases.{$databaseId}.documents.delete"], + 'collectionsCreate' => $stats["databases.{$databaseId}.collections.create"], + 'collectionsRead' => $stats["databases.{$databaseId}.collections.read"], + 'collectionsUpdate' => $stats["databases.{$databaseId}.collections.update"], + 'collectionsDelete' => $stats["databases.{$databaseId}.collections.delete"], + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_DATABASE); +}); + +App::get('/v1/databases/:databaseId/collections/:collectionId/usage') +->desc('Get usage stats for a collection') +->groups(['api', 'database']) +->label('scope', 'collections.read') +->label('sdk.auth', [APP_AUTH_TYPE_ADMIN]) +->label('sdk.namespace', 'databases') +->label('sdk.method', 'getCollectionUsage') +->label('sdk.response.code', Response::STATUS_CODE_OK) +->label('sdk.response.type', Response::CONTENT_TYPE_JSON) +->label('sdk.response.model', Response::MODEL_USAGE_COLLECTION) +->param('databaseId', '', new UID(), 'Database ID.') +->param('range', '30d', new WhiteList(['24h', '7d', '30d', '90d'], true), 'Date range.', true) +->param('collectionId', '', new UID(), 'Collection ID.') +->inject('response') +->inject('dbForProject') +->action(function (string $databaseId, string $range, string $collectionId, Response $response, Database $dbForProject) { + + $database = $dbForProject->getDocument('databases', $databaseId); + + $collectionDocument = $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId); + $collection = $dbForProject->getCollection('database_' . $database->getInternalId() . '_collection_' . $collectionDocument->getInternalId()); + + if ($collection->isEmpty()) { + throw new Exception('Collection not found', 404, Exception::COLLECTION_NOT_FOUND); + } + + $usage = []; + if (App::getEnv('_APP_USAGE_STATS', 'enabled') == 'enabled') { + $periods = [ + '24h' => [ + 'period' => '30m', + 'limit' => 48, + ], + '7d' => [ + 'period' => '1d', + 'limit' => 7, + ], + '30d' => [ + 'period' => '1d', + 'limit' => 30, + ], + '90d' => [ + 'period' => '1d', + 'limit' => 90, + ], + ]; + + $metrics = [ + "databases.{$databaseId}.collections.{$collectionId}.documents.count", + "databases.{$databaseId}.collections.{$collectionId}.documents.create", + "databases.{$databaseId}.collections.{$collectionId}.documents.read", + "databases.{$databaseId}.collections.{$collectionId}.documents.update", + "databases.{$databaseId}.collections.{$collectionId}.documents.delete", + ]; + + $stats = []; + + Authorization::skip(function () use ($dbForProject, $periods, $range, $metrics, &$stats) { + foreach ($metrics as $metric) { + $limit = $periods[$range]['limit']; + $period = $periods[$range]['period']; + + $requestDocs = $dbForProject->find('stats', [ + new Query('period', Query::TYPE_EQUAL, [$period]), + new Query('metric', Query::TYPE_EQUAL, [$metric]), + ], $limit, 0, ['time'], [Database::ORDER_DESC]); + + $stats[$metric] = []; + foreach ($requestDocs as $requestDoc) { + $stats[$metric][] = [ + 'value' => $requestDoc->getAttribute('value'), + 'date' => $requestDoc->getAttribute('time'), + ]; + } + + // backfill metrics with empty values for graphs + $backfill = $limit - \count($requestDocs); + while ($backfill > 0) { + $last = $limit - $backfill - 1; // array index of last added metric + $diff = match ($period) { // convert period to seconds for unix timestamp math + '30m' => 1800, + '1d' => 86400, + }; + $stats[$metric][] = [ + 'value' => 0, + 'date' => ($stats[$metric][$last]['date'] ?? \time()) - $diff, // time of last metric minus period + ]; + $backfill--; + } + $stats[$metric] = array_reverse($stats[$metric]); + } + }); + + $usage = new Document([ + 'range' => $range, + 'documentsCount' => $stats["databases.{$databaseId}.collections.{$collectionId}.documents.count"], + 'documentsCreate' => $stats["databases.{$databaseId}.collections.{$collectionId}.documents.create"], + 'documentsRead' => $stats["databases.{$databaseId}.collections.{$collectionId}.documents.read"], + 'documentsUpdate' => $stats["databases.{$databaseId}.collections.{$collectionId}.documents.update"], + 'documentsDelete' => $stats["databases.{$databaseId}.collections.{$collectionId}.documents.delete"] + ]); + } + + $response->dynamic($usage, Response::MODEL_USAGE_COLLECTION); +}); diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 7dfbe7142..9fcd4998c 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -889,7 +889,7 @@ App::post('/v1/functions/:functionId/executions') $events ->setParam('functionId', $function->getId()) ->setParam('executionId', $execution->getId()) - ->setContext($function); + ->setContext('function', $function); if ($async) { $event = new Func(); diff --git a/app/controllers/api/storage.php b/app/controllers/api/storage.php index e09cd7963..9a0ee380b 100644 --- a/app/controllers/api/storage.php +++ b/app/controllers/api/storage.php @@ -650,7 +650,7 @@ App::post('/v1/storage/buckets/:bucketId/files') $events ->setParam('bucketId', $bucket->getId()) ->setParam('fileId', $file->getId()) - ->setContext($bucket) + ->setContext('bucket', $bucket) ; $metadata = null; // was causing leaks as it was passed by reference @@ -1357,7 +1357,7 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId') $events ->setParam('bucketId', $bucket->getId()) ->setParam('fileId', $file->getId()) - ->setContext($bucket) + ->setContext('bucket', $bucket) ; $audits->setResource('file/' . $file->getId()); @@ -1459,7 +1459,7 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId') $events ->setParam('bucketId', $bucket->getId()) ->setParam('fileId', $file->getId()) - ->setContext($bucket) + ->setContext('bucket', $bucket) ->setPayload($response->output($file, Response::MODEL_FILE)) ; diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 8ed7d2659..3f5f2277d 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -2,6 +2,7 @@ use Appwrite\Auth\Auth; use Appwrite\Event\Audit; +use Appwrite\Event\Database as EventDatabase; use Appwrite\Event\Delete; use Appwrite\Event\Event; use Appwrite\Event\Mail; @@ -18,7 +19,7 @@ use Utopia\Database\Document; use Utopia\Database\Validator\Authorization; use Utopia\Registry\Registry; -App::init(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Stats $usage, Delete $deletes, Event $database, Database $dbForProject, string $mode) { +App::init(function (App $utopia, Request $request, Response $response, Document $project, Document $user, Event $events, Audit $audits, Mail $mails, Stats $usage, Delete $deletes, EventDatabase $database, Database $dbForProject, string $mode) { $route = $utopia->match($request); @@ -164,7 +165,7 @@ App::init(function (App $utopia, Request $request, Document $project) { } }, ['utopia', 'request', 'project'], 'auth'); -App::shutdown(function (App $utopia, Request $request, Response $response, Document $project, Event $events, Audit $audits, Stats $usage, Delete $deletes, Event $database, string $mode, Database $dbForProject) { +App::shutdown(function (App $utopia, Request $request, Response $response, Document $project, Event $events, Audit $audits, Stats $usage, Delete $deletes, EventDatabase $database, string $mode, Database $dbForProject) { if (!empty($events->getEvent())) { if (empty($events->getPayload())) { @@ -192,16 +193,17 @@ App::shutdown(function (App $utopia, Request $request, Response $response, Docum if ($project->getId() !== 'console') { $allEvents = Event::generateEvents($events->getEvent(), $events->getParams()); $payload = new Document($events->getPayload()); - $context = $events->getContext() ?? false; - $collection = ($context && $context->getCollection() === 'collections') ? $context : null; - $bucket = ($context && $context->getCollection() === 'buckets') ? $context : null; + $db = $events->getContext('database'); + $collection = $events->getContext('collection'); + $bucket = $events->getContext('bucket'); $target = Realtime::fromPayload( // Pass first, most verbose event pattern event: $allEvents[0], payload: $payload, project: $project, + database: $db, collection: $collection, bucket: $bucket, ); diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index 194f6e306..410be4d30 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -215,21 +215,56 @@ App::get('/console/keys') ->setParam('body', $page); }); -App::get('/console/database') +App::get('/console/databases') ->groups(['web', 'console']) ->label('permission', 'public') ->label('scope', 'console') ->inject('layout') ->action(function (View $layout) { - $page = new View(__DIR__ . '/../../views/console/database/index.phtml'); + $page = new View(__DIR__ . '/../../views/console/databases/index.phtml'); $layout ->setParam('title', APP_NAME . ' - Database') ->setParam('body', $page); }); -App::get('/console/database/collection') +App::get('/console/databases/database') + ->groups(['web', 'console']) + ->label('permission', 'public') + ->label('scope', 'console') + ->param('id', '', new UID(), 'Database unique ID.') + ->inject('response') + ->inject('layout') + ->action(function (string $id, Response $response, View $layout) { + + $logs = new View(__DIR__ . '/../../views/console/comps/logs.phtml'); + + $logs + ->setParam('interval', App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', 0)) + ->setParam('method', 'database.listLogs') + ->setParam('params', [ + 'database-id' => '{{router.params.id}}', + ]) + ; + + $page = new View(__DIR__ . '/../../views/console/databases/database.phtml'); + + $page->setParam('logs', $logs); + + $layout + ->setParam('title', APP_NAME . ' - Database') + ->setParam('body', $page) + ; + + $response + ->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0') + ->addHeader('Expires', 0) + ->addHeader('Pragma', 'no-cache') + ; + }); + +App::get('/console/databases/collection') ->groups(['web', 'console']) ->label('permission', 'public') ->label('scope', 'console') @@ -242,13 +277,14 @@ App::get('/console/database/collection') $logs ->setParam('interval', App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', 0)) - ->setParam('method', 'database.listCollectionLogs') + ->setParam('method', 'databases.listCollectionLogs') ->setParam('params', [ 'collection-id' => '{{router.params.id}}', + 'database-id' => '{{router.params.databaseId}}' ]) ; - $page = new View(__DIR__ . '/../../views/console/database/collection.phtml'); + $page = new View(__DIR__ . '/../../views/console/databases/collection.phtml'); $page->setParam('logs', $logs); @@ -264,29 +300,32 @@ App::get('/console/database/collection') ; }); -App::get('/console/database/document') +App::get('/console/databases/document') ->groups(['web', 'console']) ->label('permission', 'public') ->label('scope', 'console') + ->param('databaseId', '', new UID(), 'Database unique ID.') ->param('collection', '', new UID(), 'Collection unique ID.') ->inject('layout') - ->action(function (string $collection, View $layout) { + ->action(function (string $databaseId, string $collection, View $layout) { $logs = new View(__DIR__ . '/../../views/console/comps/logs.phtml'); $logs ->setParam('interval', App::getEnv('_APP_MAINTENANCE_RETENTION_AUDIT', 0)) - ->setParam('method', 'database.listDocumentLogs') + ->setParam('method', 'databases.listDocumentLogs') ->setParam('params', [ + 'database-id' => '{{router.params.databaseId}}', 'collection-id' => '{{router.params.collection}}', 'document-id' => '{{router.params.id}}', ]) ; - $page = new View(__DIR__ . '/../../views/console/database/document.phtml'); + $page = new View(__DIR__ . '/../../views/console/databases/document.phtml'); $page ->setParam('new', false) + ->setParam('database', $databaseId) ->setParam('collection', $collection) ->setParam('logs', $logs) ; @@ -296,18 +335,20 @@ App::get('/console/database/document') ->setParam('body', $page); }); -App::get('/console/database/document/new') +App::get('/console/databases/document/new') ->groups(['web', 'console']) ->label('permission', 'public') ->label('scope', 'console') + ->param('databaseId', '', new UID(), 'Database unique ID.') ->param('collection', '', new UID(), 'Collection unique ID.') ->inject('layout') - ->action(function (string $collection, View $layout) { + ->action(function (string $databaseId, string $collection, View $layout) { - $page = new View(__DIR__ . '/../../views/console/database/document.phtml'); + $page = new View(__DIR__ . '/../../views/console/databases/document.phtml'); $page ->setParam('new', true) + ->setParam('database', $databaseId) ->setParam('collection', $collection) ->setParam('logs', new View()) ; diff --git a/app/init.php b/app/init.php index 4a10d1156..941b7d8cb 100644 --- a/app/init.php +++ b/app/init.php @@ -125,6 +125,7 @@ const DATABASE_TYPE_DELETE_INDEX = 'deleteIndex'; const BUILD_TYPE_DEPLOYMENT = 'deployment'; const BUILD_TYPE_RETRY = 'retry'; // Deletion Types +const DELETE_TYPE_DATABASES = 'databases'; const DELETE_TYPE_DOCUMENT = 'document'; const DELETE_TYPE_COLLECTIONS = 'collections'; const DELETE_TYPE_PROJECTS = 'projects'; @@ -264,8 +265,9 @@ Database::addFilter( function (mixed $value, Document $document, Database $database) { return $database ->find('attributes', [ - new Query('collectionInternalId', Query::TYPE_EQUAL, [$document->getInternalId()]) - ], $database->getAttributeLimit()); + new Query('collectionInternalId', Query::TYPE_EQUAL, [$document->getInternalId()]), + new Query('databaseInternalId', Query::TYPE_EQUAL, [$document->getAttribute('databaseInternalId')]) + ], $database->getAttributeLimit(), 0, []); } ); @@ -277,7 +279,8 @@ Database::addFilter( function (mixed $value, Document $document, Database $database) { return $database ->find('indexes', [ - new Query('collectionInternalId', Query::TYPE_EQUAL, [$document->getInternalId()]) + new Query('collectionInternalId', Query::TYPE_EQUAL, [$document->getInternalId()]), + new Query('databaseInternalId', Query::TYPE_EQUAL, [$document->getAttribute('databaseInternalId')]) ], 64); } ); diff --git a/app/views/console/comps/header.phtml b/app/views/console/comps/header.phtml index 9f465f69d..a1efacac5 100644 --- a/app/views/console/comps/header.phtml +++ b/app/views/console/comps/header.phtml @@ -97,7 +97,7 @@